C# Class KBEngine.NetworkInterface

Mostrar archivo Open project: liuxq/TestGame Class Usage Examples

Protected Properties

Property Type Description
_socket Socket

Public Methods

Method Description
NetworkInterface ( ) : System
_onConnectStatus ( ConnectState state ) : void
close ( ) : void
connectTo ( string ip, int port, ConnectCallback callback, object userData ) : void
packetReceiver ( ) : PacketReceiver
process ( ) : void
reset ( ) : void
send ( KBEngine.MemoryStream stream ) : bool
sock ( ) : Socket
valid ( ) : bool

Private Methods

Method Description
_asyncConnect ( ConnectState state ) : void

在非主线程执行:连接服务器

_asyncConnectCB ( IAsyncResult ar ) : void

在非主线程执行:连接服务器结果回调

connectCB ( IAsyncResult ar ) : void

Method Details

NetworkInterface() public method

public NetworkInterface ( ) : System
return System

_onConnectStatus() public method

public _onConnectStatus ( ConnectState state ) : void
state ConnectState
return void

close() public method

public close ( ) : void
return void

connectTo() public method

public connectTo ( string ip, int port, ConnectCallback callback, object userData ) : void
ip string
port int
callback ConnectCallback
userData object
return void

packetReceiver() public method

public packetReceiver ( ) : PacketReceiver
return PacketReceiver

process() public method

public process ( ) : void
return void

reset() public method

public reset ( ) : void
return void

send() public method

public send ( KBEngine.MemoryStream stream ) : bool
stream KBEngine.MemoryStream
return bool

sock() public method

public sock ( ) : Socket
return Socket

valid() public method

public valid ( ) : bool
return bool

Property Details

_socket protected_oe property

protected Socket _socket
return Socket