source:
Daodan/Flatline/src/Flatline.c@
1163
Last change on this file since 1163 was 483, checked in by , 15 years ago | |
---|---|
File size: 366 bytes |
Rev | Line | |
---|---|---|
[457] | 1 | #include "Flatline.h" |
2 | ||
[460] | 3 | bool FLrServer_PacketCallback(char* data, int datalen, int from) |
[457] | 4 | { |
5 | static int recieved = 0; | |
6 | ||
7 | data[datalen] = '\0'; | |
8 | if (!strcmp(data, "hi")) | |
9 | printf("\r%d packets recieved ", ++recieved); | |
10 | return true; | |
11 | } | |
12 | ||
[460] | 13 | bool FLrServer_Run() |
[457] | 14 | { |
[483] | 15 | return NetUDPServer_Listen(27777, FLrServer_PacketCallback); |
[457] | 16 | } |
Note:
See TracBrowser
for help on using the repository browser.