PushFrame() public method

public PushFrame ( [ frame ) : void
frame [
return void
コード例 #1
0
        public void ReceiveFrameBytesSingleFrame()
        {
            var expected = m_socket.PushFrame("Hello");

            byte[] actual = m_socket.ReceiveFrameBytes();

            Assert.True(actual.SequenceEqual(expected));
            Assert.Equal(SendReceiveConstants.InfiniteTimeout, m_socket.LastTimeout);

            // The buffer is copied into a new array
            Assert.NotSame(expected, actual);
        }
コード例 #2
0
 private byte[] PushFrame([NotNull] string hello)
 {
     byte[] expected = Encoding.ASCII.GetBytes(hello);
     m_socket.PushFrame(expected);
     return(expected);
 }