|
|
GMainLoop *loop; /* the Glib loop used */ | GMainLoop *loop; /* the Glib loop used */ |
GIOChannel *source; /* the Glib I/O Channel used */ | GIOChannel *source; /* the Glib I/O Channel used */ |
int request_len; /* how many bytes of request are valid */ | int request_len; /* how many bytes of request are valid */ |
union { |
GAMPacket request; /* the next request being read */ |
GAMPacket request; /* the next request being read */ |
|
void *request_data; /* the next request as a char * */ |
|
}; |
|
GamListener *listener; /* the listener associated with the connection */ | GamListener *listener; /* the listener associated with the connection */ |
}; | }; |
| |
|
|
g_assert(data); | g_assert(data); |
g_assert(size); | g_assert(size); |
| |
*data = (char *) &conn->request_data + conn->request_len; |
*data = (char *) &conn->request + conn->request_len; |
*size = sizeof(GAMPacket) - conn->request_len; | *size = sizeof(GAMPacket) - conn->request_len; |
| |
return (0); | return (0); |