C# Class NSocket.SocketLib.SocketClient

Inheritance: IDisposable
Afficher le fichier Open project: ODotNet/NSocket Class Usage Examples

Méthodes publiques

Méthode Description
Connect ( ) : bool

连接服务端

Disconnect ( ) : void

断开连接

Dispose ( ) : void
Listen ( ) : void

开始监听线程的入口函数

Send ( byte sendBuffer ) : void

发送信息

SocketClient ( IPAddress address, Int32 port, int messageBuffer ) : System

初始化客户端

Private Methods

Méthode Description
OnConnect ( object sender, SocketAsyncEventArgs e ) : void

连接的完成方法

OnReceive ( object sender, SocketAsyncEventArgs e ) : void

接收的完成方法

OnSend ( object sender, SocketAsyncEventArgs e ) : void

发送的完成方法

Method Details

Connect() public méthode

连接服务端
public Connect ( ) : bool
Résultat bool

Disconnect() public méthode

断开连接
public Disconnect ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Listen() public méthode

开始监听线程的入口函数
public Listen ( ) : void
Résultat void

Send() public méthode

发送信息
public Send ( byte sendBuffer ) : void
sendBuffer byte
Résultat void

SocketClient() public méthode

初始化客户端
public SocketClient ( IPAddress address, Int32 port, int messageBuffer ) : System
address System.Net.IPAddress 服务端地址{IP地址}
port System.Int32 端口号
messageBuffer int
Résultat System