nb->size = nb->pos;
}
+void dumpNetworkBuffer(struct NetworkBuffer *nb)
+{
+ int i;
+
+ printf("::: network buffer maximum size: %d\n", nb->max_size);
+ printf("::: network buffer size: %d\n", nb->size);
+ printf("::: network buffer position : %d\n", nb->pos);
+
+ for (i = 0; i < nb->size; i++)
+ {
+ if ((i % 16) == 0)
+ printf("\n::: ");
+
+ printf("%02x ", nb->buffer[i]);
+ }
+
+ printf("\n");
+}
+
static void SendNetworkBufferToAllButOne(struct NetworkBuffer *nb,
struct NetworkServerPlayerInfo *except)
{
char *getNetworkBufferString(struct NetworkBuffer *);
void putNetworkBufferString(struct NetworkBuffer *, char *);
+void dumpNetworkBuffer(struct NetworkBuffer *);
+
int NetworkServerThread(void *);
void NetworkServer(int, int);