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.
显示文件 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_oe property

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

RemoteTcpClient public_oe property

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

TcpListener public_oe property

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