C# Class SocketClient, UnityHello

Exibir arquivo Open project: woshihuo12/UnityHello Class Usage Examples

Public Properties

Property Type Description
mLoggedIn bool

Public Methods

Method Description
OnRegister ( ) : void
OnRemove ( ) : void
SendConnect ( ) : void

发送连接请求

SendMessage ( ByteBuffer buffer ) : void

发送消息

SocketClient ( ) : UnityEngine

Private Methods

Method Description
Close ( ) : void
ConnectServer ( string host, int port ) : void
OnConnect ( IAsyncResult asr ) : void
OnDisconnected ( DisType dis, string msg ) : void
OnRead ( IAsyncResult asr ) : void
OnReceive ( byte bytes, int length ) : void

接收到消息

OnReceivedMessage ( MemoryStream, ms ) : void

接收到消息

OnWrite ( IAsyncResult r ) : void

向链接写入数据流

PrintBytes ( ) : void
RemainingBytes ( ) : long

剩余的字节

SessionSend ( byte bytes ) : void

会话发送

WriteMessage ( byte message ) : void

Method Details

OnRegister() public method

public OnRegister ( ) : void
return void

OnRemove() public method

public OnRemove ( ) : void
return void

SendConnect() public method

发送连接请求
public SendConnect ( ) : void
return void

SendMessage() public method

发送消息
public SendMessage ( ByteBuffer buffer ) : void
buffer ByteBuffer
return void

SocketClient() public method

public SocketClient ( ) : UnityEngine
return UnityEngine

Property Details

mLoggedIn public_oe static_oe property

public static bool mLoggedIn
return bool