QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Connection Management

Data Structures

struct  connection_s
 

Typedefs

typedef struct connection_s connection_t
 

Functions

connection_tConnection_Add (netadr_t *address, void *object, void(*handler)(connection_t *, void *))
 Add a new connection. More...
 
void Connection_Del (connection_t *con)
 Delete a connection. More...
 
connection_tConnection_Find (netadr_t *address)
 Search for an established connection based on the remote address. More...
 
void Connection_Init (void)
 Initialize the connection management system. More...
 

Detailed Description

Typedef Documentation

typedef struct connection_s connection_t

Function Documentation

connection_t* Connection_Add ( netadr_t address,
void *  object,
void(*)(connection_t *, void *)  handler 
)

Add a new connection.

Parameters
addressThe address of the remote end.
objectConnection specific data. Will be passed to handler.
handlerCallback for handling incoming packets. connection_t::handler
Returns
The new connection object.
void Connection_Del ( connection_t con)

Delete a connection.

Parameters
conThe connection to be deleted.
connection_t* Connection_Find ( netadr_t address)

Search for an established connection based on the remote address.

Parameters
addressThe remote address.
Returns
The connection associated with the remote address, or NULL if not found.
void Connection_Init ( void  )

Initialize the connection management system.