C# Class SharpQuake.Net

Afficher le fichier Open project: Memorix101/SharpQuake Class Usage Examples

Méthodes publiques

Свойство Type Description
ActiveConnections int
HostCacheCount int
HostPort int
LanDriverLevel int
Message MsgWriter
Reader MsgReader
SlistLocal bool
SlistSilent bool

Méthodes publiques

Méthode Description
CanSendMessage ( qsocket_t sock ) : bool

NET_CanSendMessage Returns true or false if the given qsocket can currently accept a message to be transmitted.

CheckNewConnections ( ) : qsocket_t

NET_CheckNewConnections

Close ( qsocket_t sock ) : void

NET_Close

Connect ( string host ) : qsocket_t

NET_Connect called by client to connect to a host. Returns -1 if not able to connect

FreeSocket ( qsocket_t sock ) : void

NET_FreeQSocket

GetMessage ( qsocket_t sock ) : int

NET_GetMessage returns data in net_message sizebuf returns 0 if no data is waiting returns 1 if a message was received returns 2 if an unreliable message was received returns -1 if the connection died

Init ( ) : void
NewSocket ( ) : qsocket_t

NET_NewQSocket Called by drivers when a new communications endpoint is required The sequence and buffer fields will be filled in properly

Poll ( ) : void

NET_Poll

SendMessage ( qsocket_t sock, MsgWriter data ) : int

NET_SendMessage Try to send a complete length+message unit over the reliable stream. returns 0 if the message cannot be delivered reliably, but the connection is still considered valid returns 1 if the message was sent properly returns -1 if the connection died

SendToAll ( MsgWriter data, int blocktime ) : int

NET_SendToAll This is a reliable *blocking* send to all attached clients.

SendUnreliableMessage ( qsocket_t sock, MsgWriter data ) : int

NET_SendUnreliableMessage returns 0 if the message connot be delivered reliably, but the connection is still considered valid returns 1 if the message was sent properly returns -1 if the connection died

SetNetTime ( ) : double
Shutdown ( ) : void

NET_Shutdown

Slist_f ( ) : void

NET_Slist_f

Private Methods

Méthode Description
Listen_f ( ) : void
MaxPlayers_f ( ) : void
Port_f ( ) : void
PrintSlist ( ) : void
PrintSlistHeader ( ) : void
PrintSlistTrailer ( ) : void
SchedulePollProcedure ( PollProcedure proc, double timeOffset ) : void

SchedulePollProcedure

SlistPoll ( object arg ) : void

Slist_Poll

SlistSend ( object arg ) : void

Slist_Send

Method Details

CanSendMessage() public static méthode

NET_CanSendMessage Returns true or false if the given qsocket can currently accept a message to be transmitted.
public static CanSendMessage ( qsocket_t sock ) : bool
sock qsocket_t
Résultat bool

CheckNewConnections() public static méthode

NET_CheckNewConnections
public static CheckNewConnections ( ) : qsocket_t
Résultat qsocket_t

Close() public static méthode

NET_Close
public static Close ( qsocket_t sock ) : void
sock qsocket_t
Résultat void

Connect() public static méthode

NET_Connect called by client to connect to a host. Returns -1 if not able to connect
public static Connect ( string host ) : qsocket_t
host string
Résultat qsocket_t

FreeSocket() public static méthode

NET_FreeQSocket
public static FreeSocket ( qsocket_t sock ) : void
sock qsocket_t
Résultat void

GetMessage() public static méthode

NET_GetMessage returns data in net_message sizebuf returns 0 if no data is waiting returns 1 if a message was received returns 2 if an unreliable message was received returns -1 if the connection died
public static GetMessage ( qsocket_t sock ) : int
sock qsocket_t
Résultat int

Init() public static méthode

public static Init ( ) : void
Résultat void

NewSocket() public static méthode

NET_NewQSocket Called by drivers when a new communications endpoint is required The sequence and buffer fields will be filled in properly
public static NewSocket ( ) : qsocket_t
Résultat qsocket_t

Poll() public static méthode

NET_Poll
public static Poll ( ) : void
Résultat void

SendMessage() public static méthode

NET_SendMessage Try to send a complete length+message unit over the reliable stream. returns 0 if the message cannot be delivered reliably, but the connection is still considered valid returns 1 if the message was sent properly returns -1 if the connection died
public static SendMessage ( qsocket_t sock, MsgWriter data ) : int
sock qsocket_t
data MsgWriter
Résultat int

SendToAll() public static méthode

NET_SendToAll This is a reliable *blocking* send to all attached clients.
public static SendToAll ( MsgWriter data, int blocktime ) : int
data MsgWriter
blocktime int
Résultat int

SendUnreliableMessage() public static méthode

NET_SendUnreliableMessage returns 0 if the message connot be delivered reliably, but the connection is still considered valid returns 1 if the message was sent properly returns -1 if the connection died
public static SendUnreliableMessage ( qsocket_t sock, MsgWriter data ) : int
sock qsocket_t
data MsgWriter
Résultat int

SetNetTime() public static méthode

public static SetNetTime ( ) : double
Résultat double

Shutdown() public static méthode

NET_Shutdown
public static Shutdown ( ) : void
Résultat void

Slist_f() public static méthode

NET_Slist_f
public static Slist_f ( ) : void
Résultat void

Property Details

ActiveConnections public_oe static_oe property

public static int ActiveConnections
Résultat int

HostCacheCount public_oe static_oe property

public static int HostCacheCount
Résultat int

HostPort public_oe static_oe property

public static int HostPort
Résultat int

LanDriverLevel public_oe static_oe property

public static int LanDriverLevel
Résultat int

Message public_oe static_oe property

public static MsgWriter Message
Résultat MsgWriter

Reader public_oe static_oe property

public static MsgReader Reader
Résultat MsgReader

SlistLocal public_oe static_oe property

public static bool SlistLocal
Résultat bool

SlistSilent public_oe static_oe property

public static bool SlistSilent
Résultat bool