Revision: | 460 |
Committed: | Tue Oct 6 11:21:11 2009 UTC (16 years ago) by rossy |
Content type: | text/x-csrc |
File size: | 357 byte(s) |
Log Message: |
# | Content |
---|---|
1 | #include "Flatline.h" |
2 | |
3 | bool FLrServer_PacketCallback(char* data, int datalen, int from) |
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 | |
13 | bool FLrServer_Run() |
14 | { |
15 | return Net_Listen(27777, FLrListen_PacketCallback); |
16 | } |