C# Class SocketClient.Program

ファイルを表示 Open project: ProfessionalCSharp/ProfessionalCSharp6

Public Methods

Method Description
Receiver ( NetworkStream stream, CancellationToken token ) : Task
SendAndReceive ( string hostName, int port ) : Task
Sender ( NetworkStream stream, CancellationTokenSource cts ) : Task

Private Methods

Method Description
Main ( string args ) : void
ShowUsage ( ) : void

Method Details

Receiver() public static method

public static Receiver ( NetworkStream stream, CancellationToken token ) : Task
stream NetworkStream
token System.Threading.CancellationToken
return Task

SendAndReceive() public static method

public static SendAndReceive ( string hostName, int port ) : Task
hostName string
port int
return Task

Sender() public static method

public static Sender ( NetworkStream stream, CancellationTokenSource cts ) : Task
stream NetworkStream
cts System.Threading.CancellationTokenSource
return Task