[Plib-cvs] plib/src/net netSocket.cxx,1.28,1.29 netSocket.h,1.19,1.20
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2004-03-28 04:09:38
|
Update of /cvsroot/plib/plib/src/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16984/plib/src/net Modified Files: netSocket.cxx netSocket.h Log Message: Cleanup and layout changes. Index: netSocket.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/net/netSocket.cxx,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- netSocket.cxx 22 Mar 2004 19:44:50 -0000 1.28 +++ netSocket.cxx 28 Mar 2004 03:58:24 -0000 1.29 @@ -76,35 +76,23 @@ if (host[0] == '\0') sin_addr = INADDR_ANY; - + else if (host[0] == '<' && strcmp(host, "<broadcast>") == 0) sin_addr = INADDR_BROADCAST; else { -#if 0 - int d1, d2, d3, d4; [...245 lines suppressed...] + int netInit ( int* argc, char** argv ) { /* Legacy */ @@ -426,6 +427,7 @@ return netInit () ; } + int netInit () { assert ( sizeof(sockaddr_in) == sizeof(netAddress) ) ; @@ -446,6 +448,7 @@ return(0); } + const char* netFormat ( const char* format, ... ) { static char buffer[ 256 ]; Index: netSocket.h =================================================================== RCS file: /cvsroot/plib/plib/src/net/netSocket.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- netSocket.h 22 Mar 2004 19:44:50 -0000 1.19 +++ netSocket.h 28 Mar 2004 03:58:24 -0000 1.20 @@ -49,6 +49,7 @@ */ class netAddress { + /* DANGER!!! This MUST match 'struct sockaddr_in' exactly! */ short sin_family ; unsigned short sin_port ; unsigned int sin_addr ; |