enet NAT punchthrough test improvement, seems to work fine for my test setup

This commit is contained in:
erwin coumans
2013-05-04 21:28:51 -07:00
parent c0a1ad8fcd
commit 818a78efe3
2 changed files with 25 additions and 19 deletions

View File

@@ -47,8 +47,10 @@ int main(int argc, char* argv[])
switch (event.type)
{
case ENET_EVENT_TYPE_CONNECT:
printf ("A new client connected from %x:%u.\n",
event.peer -> address.host,
char clientname[1024];
enet_address_get_host(&event.peer -> address,clientname, 1024);
printf ("A new client connected from %s:%u.\n",
clientname,
event.peer -> address.port);
/* Store any relevant client information here. */
event.peer -> data = "Client information";