C# Class SocketLibrary.SocketClient

Show file Open project: Wotuu/RTS_XNA_v2 Class Usage Examples

Public Properties

Property Type Description
END_OF_PACKET byte
Receiving bool
Sock System.Net.Sockets.Socket
SocketName string
confirmPackets System.Boolean

Public Methods

Method Description
Disable ( ) : void

Disables the socket client.

DisableLogging ( ) : void

Disables logging for this client, increasing performance.

Enable ( ) : void

Enables the socket to accept packets

GetRemoteHostIP ( ) : String

Gets the IP address of this client in string representation

OnProcessPacket ( Packet p ) : void

Packet processor has determined that the packet needed processing.

SendPacket ( Packet packet ) : void

Sends a packet to the Socket we're connected with.

Show ( Exception Text ) : void
Show ( string Text ) : void
SocketClient ( Socket _sock, string _socketname ) : System

Method Details

Disable() public method

Disables the socket client.
public Disable ( ) : void
return void

DisableLogging() public method

Disables logging for this client, increasing performance.
public DisableLogging ( ) : void
return void

Enable() public method

Enables the socket to accept packets
public Enable ( ) : void
return void

GetRemoteHostIP() public method

Gets the IP address of this client in string representation
public GetRemoteHostIP ( ) : String
return String

OnProcessPacket() public method

Packet processor has determined that the packet needed processing.
public OnProcessPacket ( Packet p ) : void
p SocketLibrary.Packets.Packet The packet that needed processing
return void

SendPacket() public method

Sends a packet to the Socket we're connected with.
public SendPacket ( Packet packet ) : void
packet SocketLibrary.Packets.Packet The packet to send
return void

Show() public method

public Show ( Exception Text ) : void
Text System.Exception
return void

Show() public method

public Show ( string Text ) : void
Text string
return void

SocketClient() public method

public SocketClient ( Socket _sock, string _socketname ) : System
_sock System.Net.Sockets.Socket
_socketname string
return System

Property Details

END_OF_PACKET public static property

public static byte END_OF_PACKET
return byte

Receiving public property

public bool Receiving
return bool

Sock public property

public Socket,System.Net.Sockets Sock
return System.Net.Sockets.Socket

SocketName public property

public string SocketName
return string

confirmPackets public property

public Boolean,System confirmPackets
return System.Boolean