This is the network thread handling packets sending/receiving to/from network other threads can register a message queue and the network thread will sort messages for them and put them in their queue.
More...
|
| virtual void | Broadcast (MsgEntry *me, int scope, int guild=-1) |
| | This broadcasts the same msg out to a bunch of Clients. More...
|
| |
| void | CheckLinkDead (void) |
| | Checks for and deletes link dead clients. More...
|
| |
| Client * | GetAnyClient (int cnum) |
| | Gets a client with the specified id. More...
|
| |
| Client * | GetClient (int cnum) |
| | Gets a client with the specified id. More...
|
| |
| ClientConnectionSet * | GetConnections () |
| | Gets a list of all connected clients. More...
|
| |
| bool | Initialize (CacheManager *cachemanager, int client_firstmsg, int npcclient_firstmsg, int timeout=15000) |
| | Initialize the network thread. More...
|
| |
| virtual void | Multicast (MsgEntry *me, const csArray< PublishDestination > &multi, uint32_t except, float range) |
| | Sends the given message me to all the clients in the list. More...
|
| |
| | NetManager () |
| |
| void | Run () |
| | This is the main thread function. More...
|
| |
| virtual bool | SendMessage (MsgEntry *me) |
| | Sends the given message to the client listed in the message. More...
|
| |
| bool | SendMessageDelayed (MsgEntry *me, csTicks delay) |
| | Queues the message for sending later, so the calling classes don't have to all manage this themselves. More...
|
| |
| | ~NetManager () |
| |
| void | AddFilterLogMessage (int type) |
| | Add a new message type to the LogMessage message filter list. More...
|
| |
| bool | AddMsgQueue (MsgQueue *, objID minID=0, objID maxID=0xffffffff) |
| | This adds another message queue (for other threads) These queues are for reading off. More...
|
| |
| bool | Bind (const char *addr, int port) |
| | Binds the socket to the specified address (only needed on server. More...
|
| |
| bool | Bind (const IN_ADDR &addr, int port) |
| |
| bool | CheckIn (void) |
| | this receives an Incoming Packet and analyses it More...
|
| |
| bool | Flush (MsgQueue *queue) |
| | Flush all messages in given queue. More...
|
| |
| iEngine * | GetEngine () |
| | Get the Engine. More...
|
| |
| csTicks | GetPing (void) |
| |
| psNetMsgProfiles * | GetProfs () |
| |
| uint32_t | GetRandomID () |
| | return a random ID that can be used for messages More...
|
| |
| void | InvertLogMessageFilter () |
| | Invert the LogMessage filter. More...
|
| |
| bool | IsReady () |
| | Is this connection ready to use? More...
|
| |
| csString | LogMessageFilter (const char *arg) |
| | Pars and configure user filter settings. More...
|
| |
| void | LogMessageFilterClear () |
| | Clear all message type from the LogMessage message filter list. More...
|
| |
| void | LogMessageFilterDump () |
| | Dump the current filter settings. More...
|
| |
| void | LogMessages (char dir, MsgEntry *me) |
| | Log the message to LOG_MESSAGE. More...
|
| |
| | NetBase (int outqueuelen=100) |
| | you can specify how much messages the ouptput queue can contain before being full. More...
|
| |
| void | ProcessNetwork (csTicks timeout) |
| | This function is the heart of NetBase - it look for new incoming packets and sends packets in the outgoing queue. More...
|
| |
| bool | QueueMessage (MsgEntry *me) |
| | This adds a completed message to any queues that are signed up. More...
|
| |
| void | RemoveFilterLogMessage (int type) |
| | Remove a message type from the LogMessage message filter list. More...
|
| |
| void | RemoveMsgQueue (MsgQueue *) |
| | this removes a queue More...
|
| |
| virtual bool | SendMessage (MsgEntry *me, NetPacketQueueRefCount *queue) |
| |
| bool | SendOut (void) |
| | sendOut sends the next packet in the outgoing message queue More...
|
| |
| void | SetEngine (iEngine *engine) |
| | Set the Engine. More...
|
| |
| void | SetLogMessageFilterHex (bool filterhex) |
| | Set the filter hex messages flag. More...
|
| |
| void | SetMsgStrings (csStringSet *msgstrings, csStringHashReversible *msgstringshash) |
| | Set the MsgString Hash. More...
|
| |
| void | ToggleReceiveMessageFilter () |
| | Toggle the global receive LogMessage filter. More...
|
| |
| void | ToggleSendMessageFilter () |
| | Toggle the global send LogMessage filter. More...
|
| |
| virtual | ~NetBase () |
| |
|
| virtual Connection * | GetConnByIP (LPSOCKADDR_IN addr) |
| | Returns a NetManager::Connection from the given IP address. More...
|
| |
| virtual Connection * | GetConnByNum (uint32_t clientnum) |
| | Returns a NetManager::Connection from the given client number. More...
|
| |
| virtual bool | HandleUnknownClient (LPSOCKADDR_IN addr, MsgEntry *msg) |
| | Handles/connects a new client from an unknown IP address. More...
|
| |
| bool | BuildMessage (psNetPacketEntry *pkt, Connection *&connection, LPSOCKADDR_IN addr) |
| | This takes incoming packets and rebuilds psMessages from them. More...
|
| |
| csPtr< MsgEntry > | CheckCompleteMessage (uint32_t client, uint32_t id) |
| | This adds the incoming packet to the pending packets tree, and builds the psMessageBytes struct and MsgEntry struct if complete. More...
|
| |
| bool | CheckDoublePackets (Connection *connection, psNetPacketEntry *pkt) |
| | This tries to drop packets that received doubled. More...
|
| |
| void | CheckFragmentTimeouts (void) |
| | This checks the list of packets waiting to be assembled into complete messages. More...
|
| |
| void | CheckResendPkts (void) |
| | This cycles through set of pkts awaiting ack and resends old ones. More...
|
| |
| void | Close (bool force=true) |
| |
| bool | FilterLogMessage (int type, char dir) |
| | Check if the given message type should be logged or not. More...
|
| |
| int | GetIPByName (LPSOCKADDR_IN addr, const char *name) |
| | some helper functions... More...
|
| |
| bool | HandleAck (psNetPacketEntry *pkt, Connection *connection, LPSOCKADDR_IN addr) |
| | This takes incoming packets and examines them for priority. More...
|
| |
| void | HandleCompletedMessage (MsgEntry *me, Connection *&connection, LPSOCKADDR_IN addr, psNetPacketEntry *pkt) |
| | This receives only fully reassembled messages and adds to appropriate queues. More...
|
| |
| bool | Init (bool autobind=true) |
| | This initialises the socket lib and creates a listening UDP socket, if you're the client you should set port to zero, so a random free port is user. More...
|
| |
| int | RecvFrom (LPSOCKADDR_IN addr, socklen_t *socklen, void *buf, unsigned int maxsize) |
| | small inliner for receiving packets... More...
|
| |
| bool | SendFinalPacket (psNetPacketEntry *pkt) |
| | Send packet to the clientnum given by clientnum in psNetPacketEntry. More...
|
| |
| bool | SendFinalPacket (psNetPacketEntry *pkt, LPSOCKADDR_IN addr) |
| | This only sends out a packet. More...
|
| |
| bool | SendMergedPackets (NetPacketQueue *q) |
| | This attempts to merge as many packets as possible into one before sending. More...
|
| |
| bool | SendSinglePacket (psNetPacketEntry *pkt) |
| | This does the sending and puts the packet in "awaiting ack" if necessary. More...
|
| |
| int | SendTo (LPSOCKADDR_IN addr, const void *data, unsigned int size) |
| | Wrapper to encapsulate the sendto call and provide for retry if the buffer is full. More...
|
| |
This is the network thread handling packets sending/receiving to/from network other threads can register a message queue and the network thread will sort messages for them and put them in their queue.
Definition at line 49 of file netmanager.h.