The Windows Sockets Electronic Discussion List
Page 1 of 50
'HYHORSLQJ7UDQVSRUW,QGHSHQGHQW$SSOLFDWLRQV 8VLQJWKH:...
17 downloads
497 Views
237KB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
The Windows Sockets Electronic Discussion List
Page 1 of 50
'HYHORSLQJ7UDQVSRUW,QGHSHQGHQW$SSOLFDWLRQV 8VLQJWKH:LQGRZV6RFNHWV,QWHUIDFH &OLFNWRRSHQRUFRS\WKHSURMHFWILOHV 3UHVHQWHGE\'DYLG7UHDGZHOO 'DYLG7UHDGZHOOKDVEHHQDFWLYHLQ0LFURVRIW:LQGRZV6RFNHWVVLQFHLWVLQFHSWLRQDFWLQJDVDFRDXWKRURIWKHVSHFLILFDWLRQDQGGHYHORSLQJWKH :LQGRZV17RSHUDWLQJV\VWHP:LQGRZV6RFNHWVLQWHUIDFH 3RUWLRQVRIWKLVVHVVLRQDUHUHSULQWHGZLWKSHUPLVVLRQIURP3OXJLQWR6HULRXV1HWZRUN3URJUDPPLQJZLWKWKH:LQGRZV6RFNHWV$3,E\- $OODUG.HLWK0RRUHDQG'DYLG7UHDGZHOO0LFURVRIW6\VWHPV-RXUQDO-XO\0LOOHU)UHHPDQ,QF
,QWURGXFWLRQ ,QWRGD\ VKHWHURJHQHRXVQHWZRUNVRQHWKLQJLVFOHDUFORVHGSURSULHWDU\VWDQGDUGVDUHXQZHOFRPH$VWKHEXVLQHVVRIQHWZRUNLQJFRPSXWHUV KDVHYROYHGRYHUWKHODVWWZRGHFDGHVKDUGZDUHDQGVRIWZDUHSURYLGHUVKDYHOHDUQHGWKDWFRRSHUDWLRQFDQ\LHOGYHU\UHZDUGLQJUHVXOWV7KH 0LFURVRIW:LQGRZV6RFNHWVHIIRUWUHSUHVHQWVDQH[WUHPHO\XVDEOHRSHQQHWZRUNLQJVWDQGDUGGHYHORS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99
The Windows Sockets Electronic Discussion List
Page 7 of 50
:LQGRZV6RFNHWVDUFKLWHFWXUHRI&KLFDJR 2QHRIWKHNH\GLIIHUHQFHVEHWZHHQWKH&KLFDJRDQG:LQGRZV17:LQGRZV6RFNHWVDUFKLWHFWXUHVLVWKDWWKHUHLVQRWKXQNLQJLQYROYHGIRU ELWDSSOLFDWLRQV7KH:LQGRZV6RFNHWV'//LVFURVVFRPSLOHGLQWRWZRGLIIHUHQWILOHV:62&.'//DQG:,162&.'//(DFKRIWKHVH VSHDNVGLUHFWO\WRWKHXQGHUO\LQJ9['VYLUWXDOGHYLFHGULYHUV ZKLFKSURYLGH:LQGRZV6RFNHWVVXSSRUWWKHUHE\HOLPLQDWLQJDQH[WUDOD\HUIRU ELWDSSOLFDWLRQV
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 8 of 50
1H[W&KLFDJRKDVPXOWLSOHNHUQHOPRGHWUDQVSRUWLQWHUIDFHVLQFOXGLQJERWK7',DQGWKH(&%HYHQWFRQWUROEORFN LQWHUIDFH7KHUHIRUHWKH GULYHUVZKLFKWUDQVODWHEHWZHHQ:LQGRZV6RFNHWVFDOOVDQGWKHWUDQVSRUWGULYHUVDUHGLIIHUHQWIRUHDFKWUDQVSRUW7KH:,162&.9[' SRLQWVWKHXVHUPRGH'//VDWWKHDSSURSULDWHNHUQHOGULYHUWKHQWKH'//VDFFHVV:67&3RU:61:ZKLFKLQWXUQVSHDNWRWKHLU WUDQVSRUWVRYHUHDFKWUDQVSRUW VLQWHUIDFH
7KH6RFNHWV3DUDGLJP 7KH6RFNHWVSDUDGLJPZDVILUVWLQWURGXFHGLQ%HUNHOH\81,;%6' LQWKHHDUO\V,QLWLDOO\GHVLJQHGDVDORFDO,3&LQWHUSURFHVV FRPPXQLFDWLRQ PHFKDQLVPVRFNHWVHYROYHGLQWRDQHWZRUN,3&PHFKDQLVPIRUWKHEXLOWLQ7&3,3SURWRFROIDPLO\$VRFNHWVLPS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IDPLO\XQGHU7&3,3LVDOZD\V$)B,1(7DGGUHVVIDPLO\,QWHUQHW
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List struct
hostent { char FAR * char FAR * FAR * short short char FAR * FAR *
Page 10 of 50
h_name; h_aliases; h_addrtype; h_length; h_addr_list;
}; 7KHKRVWHQWVWUXFWXUHLVJHQHUDOO\XVHGE\WKH:LQGRZV6RFNHWVGDWDEDVHURXWLQHVWRUHWXUQKRVWRUV\VWHPLQIRUPDWLRQDERXWDVSHFLILHG V\VWHPRQWKHQHWZRUN7KHKRVWVWUXFWXUHFRQWDLQVWKHSULPDU\QDPHIRUDV\VWHPLQFOXGLQJRSWLRQDODOLDVHVIRUWKHSULPDU\QDPH $GGLWLRQDOO\LWFRQWDLQVDOLVWRIDGGUHVVHV IRUWKHVSHFLILHGV\VWHP7KLVLQIRUPDWLRQLVJHQHUDOO\VRXJKWIRUWKHUHPRWHV\VWHPWRZKLFKDQ DSSOLFDWLRQLVFRQQHFWLQJXVLQJWKH:LQGRZV6RFNHWVGDWDEDVHURXWLQHVGHVFULEHGODWHU
struct
protoent { char FAR * char FAR * FAR * short
p_name; p_aliases; p_proto;
servent { char FAR * char FAR * FAR * short char FAR *
s_name; s_aliases; s_port; s_proto;
}; struct
}; 7KHSURWRHQWDQGVHUYHQWVWUXFWXUHVDUHDOVRILOOHGE\WKH:LQGRZV6RFNHWVGDWDEDVHURXWLQHV7KHVHVWUXFWXUHVFRQWDLQLQIRUPDWLRQDERXWD SDUWLFXODUSURWRFRO7&3RU8'3 RUVHUYLFHILQJHURUWHOQHWIRUH[DPSOH UHVSHFWLYHO\$ORQJZLWKWKHSULPDU\QDPHDQGDQDUUD\RIDOLDVHV IRUWKHSURWRFRORUVHUYLFHWKHVHVWUXFWXUHVDOVRFRQWDLQWKHLUFRUUHVSRQGLQJELW,'VQHFHVVDU\WREXLOGDYDOLG7&3,3HQGSRLQWDGGUHVV
typedef struct WSAData { WORD WORD char char unsigned short unsigned short char FAR * } WSADATA;
wVersion; wHighVersion; szDescription[WSADESCRIPTION_LEN+1]; szSystemStatus[WSASYS_STATUS_LEN+1]; iMaxSockets; iMaxUdpDg; lpVendorInfo;
)LQDOO\WKH:6$'DWDVWUXFWXUHLVILOOHGLQE\D:LQGRZV6RFNHWV'//ZKHQDQDSSOLFDWLRQFDOOVWKH:6$6WDUWXS $3,$ORQJZLWK:LQGRZV
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 11 of 50
6RFNHWVYHUVLRQLQIRUPDWLRQWKHVWUXFWXUHDOVRFRQWDLQVYHQGRUVSHFLILFLQIRUPDWLRQVXFKDVWKHPD[LPXPQXPEHURIVRFNHWVDYDLODEOHDQG WKHPD[LPXPGDWDJUDPVL]H7KHV]'HVFULSWLRQDQGV]6\VWHP6WDWXVPHPEHUVFDQEHXVHGE\DQLPSOHPHQWDWLRQWRLGHQWLI\LWVHOIDQGWKH FXUUHQWVWDWXVRIWKH'//)RUH[DPSOHDQLPSOHPHQWDWLRQPD\UHWXUQWKHWH[W-RH V6KDUH:DUH:LQGRZV6RFNHWVLPSOHPHQWDWLRQY LQV]'HVFULSWLRQ7KHVSHFLILFDWLRQRIWKHOS9HQGRU,QIRPHPEHULVFRPSOHWHO\XSWRDQLPSOHPHQWRUDQGLVQRWGHILQHGLQWKH :LQGRZV6RFNHWVVSHFLILFDWLRQ
6HWWLQJ8SDQG&OHDQLQJ8S
#define #define #define #define WSADATA char int
WS_VERSION_REQD WS_VERSION_MAJOR WS_VERSION_MINOR MIN_SOCKETS_REQD
0x0101 HIBYTE(WS_VERSION_REQD) LOBYTE(WS_VERSION_REQD) 6
wsaData; buf[MAX_BUF_LEN]; error;
. . . error=WSAStartup(WS_VERSION_REQUIRED,&wsaData); if (error !=0 ) { /* Report that Windows Sockets did not respond to the WSAStartup() call */
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 12 of 50
sprintf(buf,"WINSOCK.DLL not responding."); MessageBox (hWnd, buf. "Windows Sockets Error",MB_OK); shutdown_app(); } if (( LOBYTE (wsaData.wVersion) < WS_VERSION_MAJOR) || ( LOBYTE (wsaData.wVersion) == WS_VERSION_MAJOR && HIBYTE (wsaData.wVersion) < WS_VERSION_MINOR)) { /* Report that the application requires Windows Sockets version WS_VERSION_REQD */ /* compliance and that the WINSOCK.DLL on the system does not support it. */ sprintf(buf,"Windows Sockets version %d.%d not supported by WINSOCK.DLL", LOBYTE (wsaData.wVersion), HIBYTE (wsaData.wVersion)); MessageBox (hWnd, buf. "Windows Sockets Error",MB_OK); shutdown_app(); } if (wsaData.iMaxSockets < MIN_SOCKETS_REQUIRED ) { /* Report that WINSOCK.DLL was unable to support the minimum number of */ /* sockets (MIN_SOCKETS_REQD) for the application */ sprintf(buf,"This application requires a minimum of %d supported sockets.", MIN_SOCKETS_REQUIRED); MessageBox (hWnd, buf. "Windows Sockets Error",MB_OK); shutdown_app(); } . $:LQGRZV6RFNHWVDSSOLFDWLRQJHQHUDOO\FDOOV:6$&OHDQXS GXULQJLWVRZQFOHDQXSGHFUHPHQWLQJWKHLQWHUQDOUHIHUHQFHFRXQWDQGOHWWLQJ :LQGRZV6RFNHWVNQRZWKDWLW VQRORQJHUQHHGHGE\WKHFDOOLQJDSSOLFDWLRQ:KDWHYHUFOHDQXSWKLVIXQFWLRQIRUFHVLVLPSOHPHQWDWLRQVSHFLILF DQGVKLHOGHGIURPWKHDSSOLFDWLRQ7KHDSSOLFDWLRQDXWKRUVKRXOGKRZHYHUFKHFNIRUDQ\SRVVLEOHHUURUFRQGLWLRQVIURP:6$&OHDQXS DQG UHSRUWWKHPEHIRUHH[LWLQJDVWKLVLQIRUPDWLRQPLJKWLQGLFDWHDQHWZRUNOD\HUSUREOHPLQWKHV\VWHP
(UURU+DQGOLQJ ,QRUGHUWRSURYLGHDFRQVLVWHQWPHFKDQLVPIRUUHSRUWLQJHUURUVDQGWRHQVXUHVDIHW\RI:LQGRZV6RFNHWVDSSOLFDWLRQVLQPXOWLWKUHDGHG YHUVLRQVRI:LQGRZVOLNH:LQGRZV17 WKH:6$*HW/DVW(UURU $3,ZDVLQWURGXFHGDVDPHDQVWRJHWWKHFRGHIRUWKHODVWQHWZRUNHUURURQD SDUWLFXODUWKUHDG8QGHU:LQGRZV[WKUHDGVDIHW\LVQRWDQLVVXHDOWKRXJK:6$*HW/DVW(UURU LVVWLOOWKHDSSURSULDWHZD\WRFKHFNIRU H[WHQGHGHUURUFRGHV0DQ\IXQFWLRQVLQWKH:LQGRZV6RFNHWV$3,VHWUHWXUQDQHUURUFRGHLQWKHHYHQWWKDWWKHUHZDVDSUREOHPDQGUHO\RQ WKHDSSOLFDWLRQWRFDOO:6$*HW/DVW(UURU WRJHWPRUHGHWDLOHGLQIRUPDWLRQRQWKHIDLOXUH7KHIROORZLQJFRGHLOOXVWUDWHVKRZDQDSSOLFDWLRQ PLJKWUHSRUWDQHUURUWRDXVHU
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 13 of 50
LPHOSTENT host_info; char user_buf[MAX_BUF], appl_buf[MAX_BUF]; . . . /* Attempt to resolve hostname specified by XVHUBEXIreturn meaningful */ /* message to the user in the event of an error. */ host_info=gethostbyname(user_buf); if(host_info==NULL){ sprintf(buf,"Windows Sockets error %d: Hostname: %s couldn’t be resolved.", WSAGetLastError(),user_buf); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK);} . . . ,QDGGLWLRQWRWKH:6$*HW/DVW(UURU $3,DQDSSOLFDWLRQPD\FKRRVHWRXVHWKH:6$6HW/DVW(UURU $3,WRVHWDQHWZRUNHUURUFRQGLWLRQZKLFK ZLOOEHUHWXUQHGE\DVXEVHTXHQW:6$*HW/DVW(UURU FDOO2EYLRXVO\DQ\:LQGRZV6RFNHWVFDOOVPDGHEHWZHHQD:6$6HW/DVW(UURU DQG :6$*HW/DVW(UURU SDLUZLOORYHUULGHWKHFRGHVHWE\WKH:6$6HW/DVW(UURU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FTP service port information */ srv_info=getservbyname("ftp","tcp"); if (srv_info== NULL) { /* Couldn’t find an entry for "ftp" over "tcp" */ sprintf(buf,"Windows Sockets error %d: Couldn’t resolve FTP service port.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } /* Set up socket */ srv_addr.sin_family = AF_INET; srv_addr.sin_addr.s_addr = INADDR_ANY; srv_addr.sin_port=srv_info->s_port; 7KHH[DPSOHXVHVJHWVHUYE\QDPH WRUHVROYHWKHSRUWQXPEHURIWKH)73VHUYLFHRYHU7&37KHSRUW,'LVXVHGWRFRQVWUXFWWKHVRFNDGGUBLQ VWUXFWXUHHQGSRLQWDGGUHVV IRUIXWXUHXVHE\WKHDSSOLFDWLRQ$VZHPHQWLRQHGEHIRUHWKHDGGUHVVIDPLO\IRU7&3,3LVDOZD\VDVVLJQHGDV
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 15 of 50
$)B,1(7:HXVHWKH,1$''5B$1<PDFURWRVSHFLI\DQ\ORFDO,3LQWHUIDFHWRDFFHSWLQFRPLQJFRQQHFWLRQVPRUHRQWKLVODWHU 7RURXQGRXWWKHGDWDEDVHURXWLQHVJHWSURWRE\QDPH DQGJHWSURWRE\QXPEHU ILOOLQDSURWRHQWVWUXFWXUHVRPHWLPHVXVHGE\DSSOLFDWLRQVWR FUHDWHDVRFNHWRYHUDSDUWLFXODUSURWRFROHJ8'3RU7&3 0RUHRIWHQKRZHYHUDQDSSOLFDWLRQZLOOXVHWKH62&.B'*5$0DQG 62&.B675($0PDFURVWRFUHDWHHLWKHUGDWDJUDPRUVWUHDPVRFNHWV
'DWD0DQLSXODWLRQ5RXWLQHV 7KHUHDUHVHYHUDOURXWLQHVWKDWFRQYHUWYDOXHVEHWZHHQQHWZRUNE\WHRUGHUDQGKRVWRUORFDOV\VWHP E\WHRUGHU:LQGRZV6RFNHWVRIIHUV E\WHRUGHULQJURXWLQHVIRUDQGELWYDOXHVIURPERWKKRVWE\WHRUGHUDQGQHWZRUNE\WHRUGHU7KHKWRQV IXQFWLRQWDNHVDELWYDOXH DVKRUW DQGFRQYHUWVLWIURPKRVWE\WHRUGHUWRQHWZRUNE\WHRUGHU²KHQFHWKHQDPHKWRQVKRVWWRQHWZRUNVKRUW 7KHRWKHUE\WHRUGHULQJ IXQFWLRQVDYDLODEOHDUHKWRQO QWRKV DQGQWRKO 7KHUHDUHWZRRWKHUXVHIXOURXWLQHVRIIHUHGE\:LQGRZV6RFNHWVZKLFKFRQYHUW,3DGGUHVVHVEHWZHHQVWULQJVDQGQHWZRUNE\WHRUGHUHGELW YDOXHV7KHVHIXQFWLRQVDUHLQHWBQWRD DQGLQHWBDGGU 7KHVHURXWLQHVDUHXVHIXOWRFRQYHUWWKH,3DGGUHVVRIDQHQGSRLQWXVHULQSXW,QWKH IROORZLQJH[DPSOHD7&3EDVHGVHUYHUDSSOLFDWLRQXVHVWKHLQHWBQWRD IXQFWLRQWRORJLQFRPLQJFRQQHFWLRQDWWHPSWV
SOCKET cli_sock, srv_sock; LPSOCKADDR_IN cli_addr; char *cli_ip, buf[MAX_BUF]; int len; . /* Accept incoming connection, create new local socket cli_sock */ cli_sock=accept(srv_sock,(LPSOCKADDR)&cli_addr,&len); if (cli_sock==INVALID_SOCKET){ return(ERROR); } /* Convert endpoint IP address from network byte order to ASCII */ cli_ip=inet_ntoa(cli_addr.sin_addr); sprintf(buf,"Incoming connection request from: %s.\n",cli_ip); log_event(buf);
6HWWLQJ8S&OLHQWDQG6HUYHU6RFNHWV 0RVW:LQGRZV6RFNHWVDSSOLFDWLRQVDUHDV\PPHWULFDOWKDWLVWKHUHDUHJHQHUDOO\WZRFRPSRQHQWVWRWKHQHWZRUNDSSOLFDWLRQ²DFOLHQWDQGD VHUYHU)UHTXHQWO\WKHVHFRPSRQHQWVDUHLVRODWHGLQWRVHSDUDWHSURJUDPV6RPHWLPHVWKHVHFRPSRQHQWVDUHLQWHJUDWHGLQWRDVLQJOH
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 16 of 50
DSSOLFDWLRQVXFKDVRXUVDPSOHDSSOLFDWLRQ :KHQERWKWKHFOLHQWDQGVHUYHUFRPSRQHQWVRIDQHWZRUNLQJDSSOLFDWLRQDUHLQWHJUDWHGWKH DSSOLFDWLRQLVJHQHUDOO\UHIHUUHGWRDVDSHHUDSSOLFDWLRQ%RWKWKHFOLHQWDQGWKHVHUYHUFRPSRQHQWVJRWKURXJKGLIIHUHQWSURFHGXUHVWRUHDG\ WKHPVHOYHVIRUQHWZRUNLQJE\PDNLQJDQXPEHURI:LQGRZV6RFNHWV$3,FDOOV7KHIROORZLQJVWDWHGLDJUDPVLOOXVWUDWHWKHVWDWHWUDQVLWLRQVIRU VHWWLQJXSFOLHQWDQGVHUYHUVLGHVRFNHWDSSOLFDWLRQV
6HWWLQJXSDVHUYHUVLGHVWUHDPEDVHGDSSOLFDWLRQ
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 17 of 50
6HWWLQJXSDFOLHQWVLGHVWUHDPVRFNHWEDVHGDSSOLFDWLRQ 7KHVRFNHW FDOOFUHDWHVDQHQGSRLQWIRUERWKFOLHQWDQGVHUYHUVLGHDSSOLFDWLRQFRPPXQLFDWLRQ:KHQFDOOLQJVRFNHW WKHDSSOLFDWLRQ VSHFLILHVWKHSURWRFROIDPLO\DQGHLWKHUWKHVRFNHWW\SHVWUHDPRUGDWDJUDP RUWKHVSHFLILFSURWRFROZKLFKLWH[SHFWVWRXVHIRUH[DPSOH 7&3 %RWKWKHFOLHQWDQGVHUYHUVLGHRIDQHWZRUNDSSOLFDWLRQXVHWKHVRFNHW FDOOWRGHILQHWKHLUUHVSHFWLYHHQGSRLQWVVRFNHW UHWXUQVD VRFNHWGHVFULSWRUDQLQWHJHUZKLFKXQLTXHO\LGHQWLILHVWKHVRFNHWFUHDWHGZLWKLQ:LQGRZV6RFNHWV
file:C:\TEMP\01becc72.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WKHFRQQHFWLRQLVPDGHWKHFOLHQWFDQEHJLQLQWHUDFWLRQZLWKWKHVHUYHURQWKHQHWZRUN $OWKRXJKWKHFOLHQWPD\FKRRVHWRFDOOELQG LWLVQRWQHFHVVDU\WRGRVR&DOOLQJFRQQHFW ZLWKDQXQERXQGVRFNHWZLOOVLPSO\IRUFHWKH V\VWHPWRFKRRVHDQ,3LQWHUIDFHDQGXQLTXHSRUW,'DQGPDUNWKHVRFNHWDVERXQG0RVWFOLHQWVLGHDSSOLFDWLRQVQHJOHFWWKHELQG FDOODV WKHUHDUHUDUHO\VSHFLILFUHTXLUHPHQWVIRUDSDUWLFXODUORFDOLQWHUIDFHSRUW,'SDLU 7KHIROORZLQJFRGHIUDJPHQWVFUHDWHDQGFRQQHFWDSDLURIVWUHDPEDVHGVRFNHWVXVLQJWKH$3,IORZRXWOLQHGDERYH
6HUYHUVLGHFRQQHFWLRQRULHQWHG
#define
SERVICE_PORT
SOCKET
srv_sock,
file:C:\TEMP\01becc72.htm
5001 cli_sock;
9/3/99
The Windows Sockets Electronic Discussion List struct sockaddr_in srv_addr, char buf[MAX_BUF_LEN];
Page 19 of 50 cli_addr;
/* Create the server-side socket */ srv_sock=socket(AF_INET,SOCK_STREAM,0); if (srv_sock==INVALID_SOCKET){ sprintf(buf,"Windows Sockets error %d: Couldn’t create socket.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } srv_addr.sin_family=AF_INET; srv_addr.sin_addr.s_addr=INADDR_ANY; srv_addr.sin_port=SERVICE_PORT;
/* specific port for server to listen on */
/* Bind socket to the appropriate port and interface (INADDR_ANY) */ if (bind(srv_sock,(LPSOCKADDR)&srv_addr,sizeof(srv_addr))==SOCKET_ERROR){ sprintf(buf,"Windows Sockets error %d: Couldn’t bind socket.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } /* Listen for incoming connections */ if (listen(srv_sock,1)==SOCKET_ERROR){ sprintf(buf,"Windows Sockets error %d: Couldn’t set up listen on socket.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } /* Accept and service incoming connection requests indefinitely */ for ( ; ; ) { cli_sock=accept(srv_sock,(LPSOCKADDR)&cli_addr,&addr_len); if (cli_sock==INVALID SOCKET){ sprintf(buf,"Windows Sockets error %d: Couldn’t accept incoming \ connection on socket.",WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app();
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 20 of 50
} . /* Client-server network interaction takes place here */ . closesocket(cli_sock); } &OLHQWVLGHFRQQHFWLRQRULHQWHG
/* Static IP address for remote server for example. In reality, this would be specified as a hostname or IP address by the user */ #define
SERVER
"131.107.1.121"
struct sockaddr_in srv_addr,cli_addr; LPSERVENT srv_info; LPHOSTENT host_info; SOCKET cli_sock; . /* Set up client socket */ cli_sock=socket(PF_INET,SOCK_STREAM,0); if (cli_sock==INVALID_SOCKET){ sprintf(buf,"Windows Sockets error %d: Couldn’t create socket.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } cli_addr.sin_family=AF_INET; cli_addr.sin_addr.s_addr=INADDR_ANY; cli_addr.sin_port=0; /* no specific port req’d */ /* Bind client socket to any local interface and port */ if (bind(cli_sock,(LPSOCKADDR)&cli_addr,sizeof(cli_addr))==SOCKET_ERROR){ sprintf(buf,"Windows Sockets error %d: Couldn’t bind socket.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); }
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 21 of 50
/* Get the remote port ID to connect to for FTP service */ srv_info=getservbyname("ftp","tcp"); if (srv_info== NULL) { sprintf(buf,"Windows Sockets error %d: Couldn’t resolve FTP service port.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } srv_addr.sin_family = AF_INET; srv_addr.sin_addr.s_addr = inet_addr(SERVER); srv_addr.sin_port=srv_info->s_port; /* Connect to FTP server at address SERVER */ if (connect(cli_sock,(LPSOCKADDR)&srv_addr,sizeof(srv_addr))==SOCKET_ERROR){ sprintf(buf,"Windows Sockets error %d: Couldn’t connect socket.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } /* Client-server network interaction takes place here */ $OWKRXJKWKHDERYHIUDJPHQWPDNHVXVHRIWKHELQG $3,LWZRXOGEHMXVWDVHIIHFWLYHWRVNLSRYHUWKLVFDOODVWKHUHDUHQRVSHFLILFORFDOSRUW ,'UHTXLUHPHQWVIRUWKLVFOLHQW7KHRQO\DGYDQWDJHWKDWELQG RIIHUVLVWKHDFFHVVLELOLW\RIWKHSRUWZKLFKWKHV\VWHPFKRVHYLDWKHVLQBSRUW PHPEHURIWKHFOLBDGGUVWUXFWXUHZKLFKZLOOEHVHWXSRQVXFFHVVRIWKHELQG FDOO )RUFRQQHFWLRQOHVVRUGDWDJUDPVRFNHWV:LQGRZV6RFNHWVXVDJHLVDOLWWOHVLPSOHU6LQFHWKHFRPPXQLFDWLRQLQGDWDJUDPVRFNHWVLV FRQQHFWLRQOHVVLWLVQRWQHFHVVDU\WRXVHWKH$3,VQHFHVVDU\IRUFUHDWLQJDFRQQHFWLRQQDPHO\FRQQHFW OLVWHQ DQGDFFHSW 7KHIORZRI :LQGRZV6RFNHWV$3,VWKDWDW\SLFDOFRQQHFWLRQOHVVFOLHQWVHUYHUSDLUZLOOJHQHUDOO\WUDYHUVHIROORZV
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 22 of 50
6HWWLQJXSDVHUYHUVLGHGDWDJUDPEDVHGDSSOLFDWLRQ
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 23 of 50
6HWWLQJXSDFOLHQWVLGHVWUHDPEDVHGDSSOLFD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LGHFRQQHFWLRQOHVV
SOCKET srv_sock; struct sockaddr_in srv_addr; . . /* Create server socket for connectionless service */ srv_sock=socket(PF_INET,SOCK_DGRAM,0); if (srv_sock==INVALID_SOCKET){ sprintf(buf,"Windows Sockets error %d: Couldn’t create socket.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } /* Resolve TFTP service port to listen on */ srv_info=getservbyname("tftpd","udp"); if (srv_info== NULL) { sprintf(buf,"Windows Sockets error %d: Couldn’t resolve TFTPd service port.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } srv_addr.sin_family = AF_INET; srv_addr.sin_addr.s_addr = INADDR_ANY; srv_addr.sin_port=srv_info->s_port;
/* Allow the server to accept connections
/* over any inte
/* Bind remote server’s address and port */ if (bind(srv_sock,(LPSOCKADDR)&srv_addr,sizeof(srv_addr))==SOCKET_ERROR){ sprintf(buf,"Windows Sockets error %d: Couldn’t bind socket.", WSAGetLastError());
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 25 of 50
MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } /* Client-server network interaction takes place here */ &OLHQWVLGHFRQQHFWLRQOHVV
/* Static IP address for remote server for example. In reality, this would be specified as a hostname or IP address by the user */ #define
SERVER
"131.107.1.121"
struct sockaddr_in srv_addr,cli_addr; LPSERVENT srv_info; LPHOSTENT host_info; SOCKET cli_sock; . . /* Create client-side datagram socket */ cli_sock=socket(PF_INET,SOCK_DGRAM); if (cli_sock==INVALID_SOCKET){ sprintf(buf,"Windows Sockets error %d: Couldn’t create socket.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } cli_addr.sin_family=AF_INET; cli_addr.sin_addr.s_addr=INADDR_ANY; cli_addr.sin_port=0; /* no specific local port req’d */ /* Bind local socket */ if (bind(cli_sock,(LPSOCKADDR)&cli_addr,sizeof(cli_addr))==SOCKET_ERROR){ sprintf(buf,"Windows Sockets error %d: Couldn’t bind socket.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); }
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 26 of 50
/* Resolve port information for TFTP service */ srv_info=getservbyname("tftp","udp"); if (srv_info== NULL) { sprintf(buf,"Windows Sockets error %d: Couldn’t resolve TFTP service port.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } srv_addr.sin_family = AF_INET; srv_addr.sin_addr.s_addr = inet_addr(SERVER); srv_addr.sin_port=srv_info->s_port; if (connect(cli_sock,(LPSOCKADDR)&srv_addr,sizeof(srv_addr))==SOCKET_ERROR){ sprintf(buf,"Windows Sockets error %d: Couldn’t connect socket.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } /* Client-server network interaction takes place here */ 6LQFHDFRQQHFWLRQOHVVFOLHQWVXFKDV7)73 ZLOOXQGRXEWHGO\EHGRLQJVXFFHVVLYHWUDQVPLVVLRQVZLWKWKHVHUYHUHVSHFLDOO\GXULQJORQJ WUDQVIHUV ZHKDYHFKRVHQWRFRQQHFWWKHVRFNHWDOORZLQJWKHXVHRIWKHVHQG DQGUHFY $3,VUDWKHUWKDQVHQGWR DQGUHFYIURP 7KH XVHRIFRQQHFW ZLWKGDWDJUDPVRFNHWVLVSXUHO\RSWLRQDO
6HQGLQJDQG5HFHLYLQJ'DWDVWUHDPVRFNHWV 2QFHDQDSSOLFDWLRQVXFFHVVIXOO\HVWDEOLVKHVDVRFNHWFRQQHFWLRQLWLVUHDG\WRVWDUWWUDQVIHUULQJGDWDRYHUWKHFRQQHFWLRQ:LWKVWUHDP7&3 VRFNHWVGDWDWUDQVIHULVVDLGWREHUHOLDEOHPHDQLQJWKDWWKHDSSOLFDWLRQPD\DVVXPHWKDWWKHXQGHUO\LQJWUDQVSRUWZLOOH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HDFKIRUE\WHV7KHV\VWHPPD\FRPELQHRUFRDOHVFHWKHVHVHQGVLQWRDVLQJOHQHWZRUNSDFNHWVRWKDWLIWKHVHUYHU
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 27 of 50
DSSOLFDWLRQGLGDUHFY ZLWKDEXIIHURIE\WHVLWZRXOGJHWDOOWKHGDWDDWRQFH 7KHUHIRUHDQDSSOLFDWLRQPXVWQRWPDNHDQ\DVVXPSWLRQVDERXWKRZGDWDZLOODUULYH$VHUYHUZKLFKH[SHFWVWRUHFHLYHE\WHVVKRXOGFDOO UHFY LQDORRSXQWLOLWKDVUHFHLYHGDOORIWKHGDWD
SOCKET int char char int
s; bytes_received; buffer[1000]; *buffer_ptr; buffer_length;
. . buffer_ptr = buffer; buffer_length = sizeof(buffer); /* Receive all outstanding data on socket s */ do { bytes_received = recv(s, buffer_ptr, buffer_length, 0); if (bytes_received == SOCKET_ERROR) { sprintf(buf,"Windows Sockets error %d: Error while receiving data.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } buffer_ptr += bytes_received; buffer_length -= bytes_received; } while (buffer_length > 0); /LNHZLVHDQDSSOLFDWLRQZKLFKZDQWVWRVHQGE\WHVVKRXOGVHQG LQDORRSXQWLODOORIWKHGDWDKDVEHHQVHQW
SOCKET int char char int
s; bytes_sent; buffer[1000]; *buffer_ptr; buffer_length;
buffer_ptr = buffer; buffer_length = sizeof(buffer); /* Enter send loop until all data in buffer is sent */
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 28 of 50
do { bytes_sent = send(s, buffer_ptr, buffer_length, 0); if (bytes_sent == SOCKET_ERROR) { sprintf(buf,"Windows Sockets error %d: Error while sending data.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_app(); } buffer_ptr += bytes_sent; buffer_length -= bytes_sent; } while (buffer_length > 0);
6HQGLQJDQG5HFH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WRRQHFRUUHVSRQGHQFHEHWZHHQVHQGWR DQGUHFYIURP FDOOVDQGWKDWWKHV\VWHPGRHVQRWFRDOHVFHGDWDZKHQVHQGLQJLW)RUH[DPSOH LIDQDSSOLFDWLRQPDNHVFDOOVWRVHQGWR ZLWKDEXIIHURIWZRE\WHVWKHUHPRWHDSSOLFDWLRQZLOOQHHGWRSHUIRUPFDOOVWRUHFYIURP ZLWK DEXIIHURIDWOHDVWWZRE\WHVWRUHFHLYHDOOWKHGDWD %HORZLVDFRGHIUDJPHQWIURPDGDWDJUDPVRFNHWVDSSOLFDWLRQZKLFKHFKRVGDWDJUDPVEDFNWRWKHVHQGHU
SOCKET SOCKADDR_IN int BYTE int
s; remoteAddr; remoteAddrLength = sizeof(remoteAddr); buffer[1024]; bytesReceived;
for ( ; ; ) { /* Receive a datagram on socket s */
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 29 of 50
bytesReceived = recvfrom( s, buffer, sizeof(buffer),0, (PSOCKADDR)&remoteAddr, &remoteAddrLength ); /* Echo back to the server as long as bytes were received */ if ( bytesReceived != SOCKET_ERROR || sendto( s, buffer, bytesRecieved, 0, (PSOCKADDR)&remoteAddr, remoteAddrLength ) == SOCKET_ERROR ){ sprintf(buf,"Windows Sockets error %d: Error while sending data.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_appl(); } } $VPHQWLRQHGHDUOLHULWLVSRVVLEOHWRFRQQHFW DGDWDJUDPVRFNHW2QFHDGDWDJUDPVRFNHWLVFRQQHFWHGDOOGDWDLVVHQWDQGUHFHLYHGIURP WKHUHPRWHDGGUHVVWRZKLFKWKHGDWDJUDPLVFRQQHFWHGVRLWLVSRVVLEOHWRXVHWKHVHQG DQGUHFY $3,VRQFRQQHFWHGGDWDJUDPVRFNHWV
7HUPLQDWLQJD&RQQHFWLRQ $QDSSOLFDWLRQKDVVHYHUDORSWLRQVIRUWHUPLQDWLQJDFRQQHFWLRQ7KHVLPSOHVWLVWRFDOOWKHFORVHVRFNHW $3,ZKLFKWDNHVRQO\DVRFNHW GHVFULSWRUDVLQSXW7KLV$3,IUHHVUHVRXUFHVDVVRFLDWHGZLWKDVRFNHWDQGLQLWLDWHVWKHJUDFHIXOFORVHVHTXHQFH7KLVVHTXHQFHLVFRPSOHWHG ZKHQWKHUHPRWHDSSOLFDWLRQDOVRFORVHVLWVVRFNHW ,IDQDSSOLFDWLRQGHWHUPLQHVWKDWLWLVGRQHVHQGLQJGDWDEXWPD\ZDQWWRUHFHLYHPRUHGDWDLWFDQFDOOWKHVKXWGRZQ $3,7KLV$3,QRWLILHV WKHUHPRWHHQGWKDWWKHORFDODSSOLFDWLRQZRQ WEHVHQGLQJDQ\PRUHGDWDEXWPD\FRQWLQXHWRUHFHLYHGDWD /DVWO\DQDSSOLFDWLRQPD\FDXVHDQDERUWLYHRUKDUGFORVHRQDFRQQHFWLRQZLWKWKH62B/,1*(5VRFNHWRSWLRQLQFRQMXQFWLRQZLWK FORVHVRFNHW 6HWWLQJWKHOLQJHUWLPHRXWWRFDXVHVWKHFLUFXLWWREHWHUPLQDWHGLPPHGLDWHO\UHJDUGOHVVRIZKHWKHUWKHUHPRWHHQGKDV FRPSOHWHGLWVGDWDWUDQVIHUDQGDQ\XQUHFHLYHGRUXQVHQWGDWDLVGURSSHG7KHUHIRUHWKLVRSWLRQVKRXOGEHXVHGZLWKFDXWLRQDQGRQO\LIWKH UHVXOWVDUHXQGHUVWRRGDQGLQWHQGHG7KHIROORZLQJFRGHIUDJPHQWGHPRQVWUDWHVKRZWRSHUIRUPDKDUGFORVHRQDFRQQHFWLRQ
LINGER INT SOCKET
lingerInfo; err; s;
/* First set the linger timeout on the socket to 0. /* cause the connection to be reset. */
This will */
lingerInfo.l_onoff = 1;
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 30 of 50
lingerInfo.l_linger = 0; setsockopt( s, SOL_SOCKET, SO_LINGER, (char *)&lingerInfo,sizeof(lingerInfo) ); closesocket(s); +RZFDQDQDSSOLFDWLRQNQRZWKDWWKHUHPRWHHQGKDVWHUPLQDWHGWKHFRQQHFWLRQ"7KHDQVZHUGHSHQGVRQZKHWKHUWKHUHPRWHHQGWHUPLQDWHG WKHFRQQHFWLRQJUDFHIXOO\RUDERUWLYHO\,IWKHWHUPLQDWLRQZDVDERUWLYHWKHQVHQG DQGUHFY FDOOVZLOOIDLOZLWKWKHHUURU:6$(&2115(6(7 7KLVLQGLFDWHVWRDQDSSOLFDWLRQWKDWGDWDPD\KDYHEHHQORVWDQGWKHHUURUFRQGLWLRQVKRXOGEHUHSRUWHGWRWKHXVHU ,IWKHWHUPLQDWLRQZDVJUDFHIXOWKHQDQ\UHFY FDOOVPDGHDIWHUDOOGDWDKDVEHHQUHFHLYHGZLOOUHWXUQWKHYDOXH]HURDVWKHQXPEHURIE\WHV UHFHLYHG7KLVLQGLFDWHVWKDWWKHUHPRWHHQGKDVJUDFHIXOO\WHUPLQDWHGLWVHQGRIWKHFRQQHFWLRQDQGWKHORFDOHQGPD\FORVHWKHVRFNHWZLWKRXW IHDURIGDWDORVV7KHIROORZLQJFRGHIUDJPHQWLOOXVWUDWHVKRZDQDSSOLFDWLRQLQLWLDWHVDJUDFHIXOFORVHDQGWKHQZDLWVIRUWKHUHPRWHHQGWR FORVHJUDFHIXOO\EHIRUHFORVLQJWKHVRFNHW
SOCKET INT BYTE
s; err; buffer[1024];
err = shutdown( s , 1 ); if ( err == SOCKET_ERROR ) { sprintf(buf,"Windows Sockets error %d: Error during shutdown.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_appl(); } /* Receive the rest of the pending data */ while ( (err = recv( s, buffer, sizeof(buffer), 0 ) != 0 ) { if ( err == SOCKET_ERROR ) { sprintf(buf,"Windows Sockets error %d: Error while receiving data.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_appl(); } . . /* do something with the data we received. */ . . }
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List /* The other side has also terminated.
Page 31 of 50 we can safely close now */
closesocket( s ); 1RWHWKDWLQWKLVH[DPSOHWKHDSSOLFDWLRQNHHSVFDOOLQJUHFY XQWLOLWUHWXUQV]HURE\WHVUHFHLYHG,IDQDSSOLFDWLRQFORVHVDVRFNHWDQGWKHUHLV GDWDDYDLODEOHWREHUHFHLYHGRUGDWDODWHUDUULYHVWKHQWKHV\VWHPZLOODERUWWKHFRQQHFWLRQDQGWKURZRXWWKHGDWDVLQFHWKHUHLVQRERG\WR JLYHWKHGDWDWR:HOOEHKDYHGDSSOLFDWLRQVVKRXOGHQVXUHWKDWWKH\UHFHLYHDOOGDWDEHIRUHFORVLQJDVRFNHW
$V\QFKURQRXV:LQGRZV6RFNHWV&DOOV %\GHIDXOWDQDSSOLFDWLRQ VVRFNHWFDOOVZLOOEORFNXQWLOWKHUHTXHVWHGRSHUDWLRQFDQEHFRPSOHWHG)RUH[DPSOHLIDQDSSOLFDWLRQZLVKHVWR UHFHLYHGDWDIURPDQRWKHUDSSOLFDWLRQLWVFDOOWRWKHUHFY $3,ZLOOQRWFRPSOHWHXQWLOWKHRWKHUDSSOLFDWLRQKDVVHQWGDWDZKLFKFDQEH UHWXUQHGWRWKHFDOOLQJDSSOLFDWLRQ 7KLVPRGHOLVVXIILFLHQWIRUVLPSOHDSSOLFDWLRQVEXWPRUHVRSKLVWLFDWHGDSSOLFDWLRQVPD\QRWZLVKWREORFNIRUDQDUELWUDULO\ORQJSHULRGIRUD QHWZRUNHYHQW,QIDFWLQ:LQGRZVEORFNLQJRSHUDWLRQVDUHFRQVLGHUHGSRRUSURJUDPPLQJSUDFWLFHEHFDXVHDSSOLFDWLRQVDUHH[SHFWHGWR FDOO3HHN0HVVDJH RU*HW0HVVDJH UHJXODUO\LQRUGHUWRDOORZRWKHUDSSOLFDWLRQVWRUXQDQGWRUHFHLYHXVHULQSXW 7RVXSSRUWWKHVRSKLVW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VLQWHUHVWHGLQEHLQJ QRWLILHGZKHQRQHRIWKUHHQHWZRUNHYHQWVRFFXUV
GDWDDUULYHVRQWKHVRFNHW
LWLVSRVVLEOHWRVHQGGDWDRQWKHVRFNHW
WKHUHPRWHHQGKDVFORVHGWKHVRFNHW
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 32 of 50
/* Static IP address for remote server for example. In reality, this would be specified as a hostname or IP address by the user */ #define #define #define
SERVER
"131.107.1.121"
SOCKET_MESSAGE SERVER_PORT
WM_USER+1 4000
struct sockaddr_in srv_addr; SOCKET cli_sock; . . . /* Create client-side socket */ cli_sock=socket(PF_INET,SOCK_STREAM,0); if (cli_sock==INVALID_SOCKET){ sprintf(buf, "Windows Sockets error %d: couldn’t open socket.", WSAGetLastError()); MessageBox(hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_appl(); } srv_addr.sin_family = AF_INET; srv_addr.sin_addr.s_addr = inet_addr(SERVER); srv_addr.sin_port=SERVER_PORT; /* Connect to server */ if (connect(cli_sock,(LPSOCKADDR)&srv_addr,sizeof(srv_addr))==SOCKET_ERROR){ sprintf(buf,"Windows Sockets error %d: Couldn’t connect socket.", WSAGetLastError()); MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_appl(); } /* Set up async select on FD_READ, FD_WRITE, and FD_CLOSE events */ err = WSAAsyncSelect(cli_sock, hWnd, SOCKET_MESSAGE, FD_READ|FD_WRITE|FD_CLOSE); if (err == SOCKET_ERROR) { sprintf(buf,"Windows Sockets error %d: WSAAsyncSelect failure.", WSAGetLastError());
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 33 of 50
MessageBox (hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_appl(); } :KHQRQHRIWKHVSHFLILHGQHWZRUNHYHQWVRFFXUVWKHVSHFLILHGZLQGRZKDQGOHK:QGUHFHLYHVDPHVVDJHFRQWDLQLQJDZ0VJRI 62&.(7B0(66$*(7KHZ3DUDPILHOGRIWKHPHVVDJHZLOOKDYHWKHVRFNHWKDQGOHDQGO3DUDPFRQWDLQVWZRSLHFHVRILQIRUPDWLRQWKHORZ ZRUGFRQWDLQVWKHHYHQWWKDWRFFXUUHG)'B5($')'B:5,7(RU)'B&/26( DQGWKHKLJKZRUGFRQWDLQVDQHUURUFRGHRULIWKHUHZDVQR HUURU&RGHVLPLODUWRWKHIROORZLQJIUDJPHQWZKLFKZRXOGEHORQJLQDQDSSOLFDWLRQ VPDLQZLQGRZSURFHGXUHPD\EHXVHGWRLQWHUSUHWD PHVVDJHIURP:6$$V\QF6HOHFW
long FAR PASCAL _export WndProc(HWND hWnd, UINT message, UINT wParam, LONG lParam) { INT err; switch (message) { case ...: /* handle Windows messages */ . . . case SOCKET_MESSAGE: /* A network event has occurred on our socket. Determine which network event occurred. */ switch (WSAGETSELECTEVENT(lParam)) { case FD_READ: /* Data arrived. Receive it. */ err = recv(cli_sock, Buffer, BufferLength, 0); if (WSAGetLastError() == WSAEWOULDBLOCK) { /* We have already received the data. */ break; } if (err == SOCKET_ERROR) { sprintf(buf, "Windows Sockets error %d: receive error.", WSAGetLastError()); MessageBox(hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_appl(); } . . /* Do something useful with the data. */ . .
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 34 of 50
break; case FD_WRITE: /* We can send data. */ err = send(cli_sock, Buffer, BufferLength, 0); if (err == SOCKET_ERROR) { if (WSAGetLastError() == WSAEWOULDBLOCK) { /* Send buffers overflowed. */ break; } sprintf(buf, "Windows Sockets error %d: send failed.", SAGetLastError()); MessageBox(hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_appl(); } break; case FD_CLOSE: /* The remote closed the socket. */ closesocket(cli_sock); break; } break; } . $QLPSRUWDQWSDUWRIWKHEHKDYLRURI:6$$V\QF6HOHFW LVWKDWDIWHUWKH:LQGRZV6RFNHWV'//KDVSRVWHGDPHVVDJHIRUD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URXWLQHVWKH:LQGRZV6RFNHWV$3,VXSSOLHVDV\QFKURQRXVYHUVLRQVRIWKHGDWDEDVHURXWLQHV7KHLU XVHLVVLPLODUWRWKHV\QFKURQRXVGDWDEDVHURXWLQHVZLWKWZRLPSRUWDQWH[FHSWLRQV
&RPSOHWLRQRIWKHRSHUDWLRQLVLQGLFDWHGYLDD:LQGRZVPHVVDJHDVZLWK:6$$V\QF6HOHFW 7KHDSSOLFDWLRQLVUHTXLUHGWRLQFOXGHDEXIIHUZKLFKLVILOOHGLQE\WKH:LQGRZV6RFNHWV'//ZLWKWKHLQIRUPDWLRQUHTXHVWHGE\WKH DSSOLFDWLRQ7KLVLVLQFRQWUDVWWRWKHV\QFKURQRXVGDWDEDVHURXWLQHVZKLFKUHWXUQDSRLQWHUWRVSDFHRZQHGE\WKH:LQGRZV6RFNHWV'//
,QRUGHUWRPDNHDQDV\QFKURQRXVGDWDEDVHFDOODQDSSOLFDWLRQSDVVHVLQLQIRUPDWLRQDERXWWKHFDOODZLQGRZKDQGOHWRUHFHLYHWKH FRPSOHWLRQPHVVDJHDPHVVDJHFRGHDQGDEXIIHUIRUWKHRXWSXWLQIRUPDWLRQ7KH:LQGRZV6RFNHWV$3,GHILQHVDFRQVWDQW 0$;*(7+2676758&7ZKLFKLVWKHPD[LPXPVL]HRIDKRVWHQWVWUXFWXUH$QDSSOLFDWLRQVKRXOGXVHDEXIIHURIWKLVVL]HWRSDVVWRWKH DV\QFKURQRXVGDWDEDVHURXWLQHVLQRUGHUWREHJXDUDQWHHGWKDWDOOWKHRXWSXWLQIRUPDWLRQZLOOILWLQLWVEXIIHU$FDOOWR :6$$V\QF*HW+RVW%\1DPH PD\EHDVIROORZV
#define GETHOST_MESSAGE BYTE HANDLE TaskHandle;
WM_USER+2
HostBuffer[MAXGETHOSTSTUCT];
/* Resolve hostname "hostname" asynchronously */ TaskHandle = WSAAsyncGetHostByName(hWnd, GETHOST_MESSAGE, "hostname", HostBuffer,
MAXGETHOSTST
if (TaskHandle == SOCKET_ERROR) { sprintf(buf, "Windows Sockets error %d: Hostname couldn’t be resolved.", WSAGetLastError()); MessageBox(hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_appl(); } :6$$V\QF*HW+RVW%\1DPH DQGWKHRWKHUDV\QFKURQRXVGDWDEDVHURXWLQHVUHWXUQDWDVNKDQGOHZKLFKXQLTXHO\UHIHUVWRWKHRSHUDWLRQLQ SURJUHVV7KLVWDVNKDQGOHDOORZVDQDSSOLFDWLRQZKLFKPD\KDYHPXOWLSOHRXWVWDQGLQJDV\QFKURQRXVGDWDEDVHURXWLQHVWRDVVRFLDWHFRPSOHWLRQ PHVVDJHVZLWKWKHUHTXHVWVLQFHWKHWDVNKDQGOHLVUHWXUQHGLQWKHFRPSOHWLRQPHVVDJHDVZ3DUDP 7RUHFHLYHDQGSURFHVVWKHFRPSOHWLRQPHVVDJHDQDSSOLFDWLRQZLOOGRWKHIROORZLQJLQLWVZLQGRZSURFHGXUH
long FAR PASCAL _export WndProc(HWND hWnd, UINT message, UINT wParam, LONG lParam) { INT err;
file:C:\TEMP\01becc72.htm
9/3/99
The Windows Sockets Electronic Discussion List
Page 36 of 50
switch (message) { case ...: /* handle Windows messages */ . . . case GETHOST_MESSAGE: /* An asynchronous database routine completed. */ if (WSAGETASYNCERROR(lParam) != 0) { sprintf(buf, "Windows Sockets error %d: Hostname couldn’t be resolved.", WSAGetLastError()); MessageBox(hWnd,buf,"Windows Sockets Error",MB_OK); shutdown_appl(); } . . /* HostBuffer now contains a host buffer, use info from it. */ . . }
:LQGRZV6RFNHWVRQ:LQGRZV17 $OWKRXJKWKHLQLWLDOIRFXVRI:LQGRZV6RFNHWVZDVIRU:LQGRZVELWDSSOLFDWLRQV:LQGRZV17VXSSRUWV:LQGRZV6RFNHWVDVZHOO7RUXQ H[LVWLQJELW:LQGRZV6RFNHWVDSSOLFDWLRQV:LQGRZV17VXSSOLHV:,162&.'//,QDGGLWLRQ:LQGRZV17RIIHUVELW:LQGRZV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