X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fcli%2Funix-netplay.c;h=747fa0009e3bcc2ef0abb4f2c00dbcc9c7259c4a;hb=2a6855a31daf79cad83545b1eeee646e10481e5e;hp=d5d1cc4f9ee5b3a19f68ec6bfb4c968f0d85c9cc;hpb=c62d28102c77e19c291c78bf6bf7f0a81abd54b9;p=fceu.git diff --git a/drivers/cli/unix-netplay.c b/drivers/cli/unix-netplay.c index d5d1cc4..747fa00 100644 --- a/drivers/cli/unix-netplay.c +++ b/drivers/cli/unix-netplay.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -60,7 +61,7 @@ int FCEUD_NetworkConnect(void) if(bind(TSocket, (struct sockaddr *)&sockn, sizeof(sockn))<0) { close(TSocket); - puts("Error binding to socket."); + puts("Error binding to socket."); return(0); } if(listen(TSocket, 1)<0) @@ -71,7 +72,7 @@ int FCEUD_NetworkConnect(void) } { socklen_t len=sizeof(sockn); - + printf("Accepting connection on port %d...\n",Port); if((Socket=accept(TSocket,(struct sockaddr *)&sockn,&len))<0 ) { @@ -95,7 +96,7 @@ int FCEUD_NetworkConnect(void) return(0); } memcpy(&sockn.sin_addr,Host->h_addr,Host->h_length); - } + } printf("Attempting to connect to %s...\n",netplayhost); if( connect(TSocket, (struct sockaddr *)&sockn, sizeof(sockn)) <0 ) { @@ -105,7 +106,7 @@ int FCEUD_NetworkConnect(void) } Socket=TSocket; } - return(1); + return(1); } /* 0 on failure, 1 on success, -1 if it would block and blocking is not