Revision 20
started moving ColonetServer into a class. the code is pretty messy at the moment
client.cpp | ||
---|---|---|
20 | 20 |
|
21 | 21 |
/* Globals */ |
22 | 22 |
static ColonetWireless* wireless; |
23 |
extern ConnectionPool connection_pool; |
|
23 |
extern ConnectionPool * connection_pool;
|
|
24 | 24 |
|
25 | 25 |
|
26 | 26 |
/* Public functions */ |
... | ... | |
38 | 38 |
printf("response\n"); |
39 | 39 |
|
40 | 40 |
int dest = (int)(pkt->msg_dest); |
41 |
if (dest < connection_pool.get_next_available_slot())
|
|
41 |
if (dest < connection_pool->get_next_available_slot())
|
|
42 | 42 |
{ |
43 | 43 |
char buffer[WRITE_BUFFER_SIZE]; |
44 | 44 |
|
... | ... | |
46 | 46 |
snprintf(buffer, WRITE_BUFFER_SIZE, "%d\n", value); |
47 | 47 |
|
48 | 48 |
int len = strlen(buffer); |
49 |
connection_pool.write_to_client(dest, buffer, len);
|
|
49 |
connection_pool->write_to_client(dest, buffer, len);
|
|
50 | 50 |
printf("Put data in write buffer for client.\n"); |
51 | 51 |
} |
52 | 52 |
else |
Also available in: Unified diff