hit counter script

Toshiba V Series User Manual page 88

Integrated controller ethernet module, en311
Hide thumbs Also See for V Series:
Table of Contents

Advertisement

Chapter 5 Computer Link Protocol and the PC Link Protocol Transmission
5
68
/*---------------------------------*/
/* Prototype declarations */
/*---------------------------------*/
int cl_send( int );
void main()
{
int ists;
int isdp ;
int i
;
struct sockaddr_in Soc;
WORD wVersionRequested = (0,1);
WSADATA WsaDtata ;
ists = 0 ;
ists = WSAStartup( wVersionRequested, &WsaDtata ) ;
if( ists == 0 ){
isdp = socket(AF_INET, SOCK_DGRAM, 0);
if( isdp != INVALID_SOCKET ){
Soc.sin_family = AF_INET;
Soc.sin_addr.s_addr = 0 ;
Soc.sin_port = htons( MY_PORT );
ists = bind(isdp, (struct sockaddr *)&Soc, sizeof(Soc) );
if( ists != SOCKET_ERROR ){
for( i = 0; i < LOOP; i++){
ists = cl_send( isdp );
if( ists != 0 )
break ;
}
}
closesocket( isdp ) ;
}
}
WSACleanup() ;
}
/* Register read/write processing
/* Return status
/* Socket identifier
/* Loop counter
/* WINSOC version number specification */
/* WINSOC data structure
/* Initialization
/* Initial value setting
/* Windows socket initialization
/* If normal return:
/* Create socket (UDP)
/* If normal return:
/* Set local IP address
/* Set local port number
/* Execute bind processing
/* If bind completed normally:
/* Loop for the specified number of times
/* Register read/write processing
/* If an error occurred in register
read/write processing
/* Terminate processing
/* Socket close processing
/* Report WINSOC termination
Ethernet module User's Manual
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/

Advertisement

Table of Contents
loading

Table of Contents