C# Class System.Net.Sockets.Performance.Tests.SocketTestClient

显示文件 Open project: dotnet/corefx Class Usage Examples

Protected Properties

Property Type Description
_endpoint System.Net.EndPoint
_iterations int
_log ITestOutputHelper
_port int
_recvBuffer byte[]
_recvBufferIndex int
_s Socket
_sendBuffer byte[]
_sendBufferIndex int
_server string

Public Methods

Method Description
Close ( System.Action onCloseCallback ) : void
Connect ( Action onConnectCallback ) : void
Receive ( SocketError>.Action onReceiveCallback ) : void
RunTest ( ) : Task
Send ( SocketError>.Action onSendCallback ) : void
SocketTestClient ( ITestOutputHelper log, string server, int port, int iterations, string message, Stopwatch timeProgramStart ) : System.Diagnostics
SocketTestClientFactory ( ITestOutputHelper log, SocketImplementationType type, string server, int port, int iterations, string message, Stopwatch timeProgramStart ) : SocketTestClient

Protected Methods

Method Description
ImplementationName ( ) : string

Private Methods

Method Description
OnClose ( ) : void
OnConnect ( SocketError error ) : void
OnReceive ( int receivedBytes, SocketError error ) : void
OnReceiveMessage ( ) : void
OnSend ( int bytesSent, SocketError error ) : void
OnSendMessage ( ) : void

Method Details

Close() public abstract method

public abstract Close ( System.Action onCloseCallback ) : void
onCloseCallback System.Action
return void

Connect() public abstract method

public abstract Connect ( Action onConnectCallback ) : void
onConnectCallback Action
return void

ImplementationName() protected abstract method

protected abstract ImplementationName ( ) : string
return string

Receive() public abstract method

public abstract Receive ( SocketError>.Action onReceiveCallback ) : void
onReceiveCallback SocketError>.Action
return void

RunTest() public method

public RunTest ( ) : Task
return Task

Send() public abstract method

public abstract Send ( SocketError>.Action onSendCallback ) : void
onSendCallback SocketError>.Action
return void

SocketTestClient() public method

public SocketTestClient ( ITestOutputHelper log, string server, int port, int iterations, string message, Stopwatch timeProgramStart ) : System.Diagnostics
log ITestOutputHelper
server string
port int
iterations int
message string
timeProgramStart Stopwatch
return System.Diagnostics

SocketTestClientFactory() public static method

public static SocketTestClientFactory ( ITestOutputHelper log, SocketImplementationType type, string server, int port, int iterations, string message, Stopwatch timeProgramStart ) : SocketTestClient
log ITestOutputHelper
type SocketImplementationType
server string
port int
iterations int
message string
timeProgramStart Stopwatch
return SocketTestClient

Property Details

_endpoint protected_oe property

protected EndPoint,System.Net _endpoint
return System.Net.EndPoint

_iterations protected_oe property

protected int _iterations
return int

_log protected_oe property

protected ITestOutputHelper _log
return ITestOutputHelper

_port protected_oe property

protected int _port
return int

_recvBuffer protected_oe property

protected byte[] _recvBuffer
return byte[]

_recvBufferIndex protected_oe property

protected int _recvBufferIndex
return int

_s protected_oe property

protected Socket _s
return Socket

_sendBuffer protected_oe property

protected byte[] _sendBuffer
return byte[]

_sendBufferIndex protected_oe property

protected int _sendBufferIndex
return int

_server protected_oe property

protected string _server
return string