C# Class CSharpUtils.Net.TcpTestServer

Creates a TcpListener and connects a Socket to it. It stores the two TcpClient on the object: the local to the listener and the remote one. Very useful for unittesting components that requires sockets.
Show file Open project: soywiz/csharputils Class Usage Examples

Public Properties

Property Type Description
LocalTcpClient System.Net.Sockets.TcpClient
RemoteTcpClient System.Net.Sockets.TcpClient
TcpListener System.Net.Sockets.TcpListener

Public Methods

Method Description
Create ( ) : TcpTestServer

Method Details

Create() public static method

public static Create ( ) : TcpTestServer
return TcpTestServer

Property Details

LocalTcpClient public property

public TcpClient,System.Net.Sockets LocalTcpClient
return System.Net.Sockets.TcpClient

RemoteTcpClient public property

public TcpClient,System.Net.Sockets RemoteTcpClient
return System.Net.Sockets.TcpClient

TcpListener public property

public TcpListener,System.Net.Sockets TcpListener
return System.Net.Sockets.TcpListener