add list of parked conenctions

This commit is contained in:
matthias.ringwald 2010-07-29 18:31:55 +00:00
parent 084bd1d141
commit 8dd67f0fa9
2 changed files with 5 additions and 4 deletions

View File

@ -93,6 +93,7 @@ struct connection {
/** list of socket connections */
static linked_list_t connections = NULL;
static linked_list_t parked = NULL;
/** client packet handler */
@ -528,10 +529,10 @@ int socket_connection_close_unix(connection_t * connection){
}
/**
* try to dispatch packet for all "parked" connections. start at random point for fairness
* try to dispatch packet for all "parked" connections.
* if dispatch is successful, a connection is added again to run loop
*/
void socket_connection_retry_parked_random(){
void socket_connection_retry_parked(){
// re-try dispatching packet
// int dispatch_err = (*socket_connection_packet_callback)(conn, READ_BT_16( conn->buffer, 0), READ_BT_16( conn->buffer, 2),
// &conn->buffer[sizeof(packet_header_t)], READ_BT_16( conn->buffer, 4));

View File

@ -102,7 +102,7 @@ void socket_connection_send_packet(connection_t *connection, uint16_t packet_typ
void socket_connection_send_packet_all(uint16_t type, uint16_t channel, uint8_t *packet, uint16_t size);
/**
* try to dispatch packet for all "parked" connections. start at random point for fairness
* try to dispatch packet for all "parked" connections.
* if dispatch is successful, a connection is added again to run loop
*/
void socket_connection_retry_parked_random();
void socket_connection_retry_parked();