C# Class LiteNetLib.NetSocket

Show file Open project: RevenantX/LiteNetLib Class Usage Examples

Public Methods

Method Description
Bind ( int port ) : bool
Close ( ) : void
NetSocket ( NetBase onMessageReceived ) : System
SendBroadcast ( byte data, int offset, int size, int port ) : bool
SendTo ( byte data, int offset, int size, NetEndPoint remoteEndPoint, int &errorCode ) : int

Private Methods

Method Description
BindSocket ( Socket socket, IPEndPoint ep ) : bool
ClearPeers ( ) : void
OnMessageReceived ( DatagramSocket sender, DatagramSocketMessageReceivedEventArgs args ) : void
ReceiveLogic ( object state ) : void
RemovePeer ( NetEndPoint ep ) : void

Method Details

Bind() public method

public Bind ( int port ) : bool
port int
return bool

Close() public method

public Close ( ) : void
return void

NetSocket() public method

public NetSocket ( NetBase onMessageReceived ) : System
onMessageReceived NetBase
return System

SendBroadcast() public method

public SendBroadcast ( byte data, int offset, int size, int port ) : bool
data byte
offset int
size int
port int
return bool

SendTo() public method

public SendTo ( byte data, int offset, int size, NetEndPoint remoteEndPoint, int &errorCode ) : int
data byte
offset int
size int
remoteEndPoint NetEndPoint
errorCode int
return int