C# Class ACR_ServerCommunicator.SocketIo

This class supports direct socket I/O.
Show file Open project: ALandFarAway/ALFA-Base-Resources Class Usage Examples

Public Methods

Method Description
Initialize ( ACR_ServerCommunicator Script ) : bool

Initialize the socket subsystem.

SendMessage ( byte Message, IPAddress Destination, int DestinationPort ) : void

Send a message to an arbitrary destination using the server's data socket.

SendMessage ( byte Message, sockaddr_in Destination ) : void

Send a message to an arbitrary destination using the server's data socket.

Private Methods

Method Description
OnDatagramReceive ( IntPtr buf, int len, sockaddr_in Sender ) : void

This routine handles ALFA datagram protocol messages that have been received over the network.

OnLowLevelReceive ( IntPtr s, IntPtr buf, int len, int flags, IntPtr from, IntPtr fromlen ) : int

Called when nwn2server receives a message from UDP. The routine decides if the message should be internally handled, and, if so, packages it up for managed handling. Otherwise, the original nwn2server handling is continued.

SetRecvfromCallout ( IntPtr NewCallout ) : IntPtr
getsockname ( IntPtr s, sockaddr_in &name, int &namelen ) : int
sendto ( IntPtr s, IntPtr buf, int len, int flags, sockaddr_in &to, int tolen ) : int

Method Details

Initialize() public static method

Initialize the socket subsystem.
public static Initialize ( ACR_ServerCommunicator Script ) : bool
Script ACR_ServerCommunicator Supplies the main script object.
return bool

SendMessage() public static method

Send a message to an arbitrary destination using the server's data socket.
public static SendMessage ( byte Message, IPAddress Destination, int DestinationPort ) : void
Message byte Supplies the bytes to send.
Destination System.Net.IPAddress Supplies the destination network address. ///
DestinationPort int Supplies the destination port. ///
return void

SendMessage() public static method

Send a message to an arbitrary destination using the server's data socket.
public static SendMessage ( byte Message, sockaddr_in Destination ) : void
Message byte Supplies the bytes to send.
Destination sockaddr_in Supplies the destination address.
return void