C# Class UDPPacketIO, wekinator_examples

Inheritance: MonoBehaviour
Exibir arquivo Open project: fiebrink1/wekinator_examples Class Usage Examples

Public Methods

Method Description
Close ( ) : void

Close the socket currently listening, and destroy the UDP sender device.

IsOpen ( ) : bool

Query the open state of the UDP socket.

OnDisable ( ) : void
Open ( ) : bool

Open a UDP socket and create a UDP sender.

ReceivePacket ( byte buffer ) : int

Receive a packet of bytes over UDP.

SendPacket ( byte packet, int length ) : void

Send a packet of bytes out via UDP.

init ( string hostIP, int remotePort, int localPort ) : void

Private Methods

Method Description
Start ( ) : void

Method Details

Close() public method

Close the socket currently listening, and destroy the UDP sender device.
public Close ( ) : void
return void

IsOpen() public method

Query the open state of the UDP socket.
public IsOpen ( ) : bool
return bool

OnDisable() public method

public OnDisable ( ) : void
return void

Open() public method

Open a UDP socket and create a UDP sender.
public Open ( ) : bool
return bool

ReceivePacket() public method

Receive a packet of bytes over UDP.
public ReceivePacket ( byte buffer ) : int
buffer byte The buffer to be read into.
return int

SendPacket() public method

Send a packet of bytes out via UDP.
public SendPacket ( byte packet, int length ) : void
packet byte The packet of bytes to be sent.
length int The length of the packet of bytes to be sent.
return void

init() public method

public init ( string hostIP, int remotePort, int localPort ) : void
hostIP string
remotePort int
localPort int
return void