Changes between Version 10 and Version 11 of Docs/Prog/Manual/DeviceSupport/Network
- Timestamp:
- 04/29/11 09:43:40 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Docs/Prog/Manual/DeviceSupport/Network
v10 v11 385 385 struct hostent *svr; 386 386 char buffer[50], rcv_buf[50]; 387 int sockfd, n, i, rcv_pos = 0;387 int sockfd, n, i, flags, rcv_pos = 0; 388 388 RcvMode rcvMode = rcvIdle; 389 389 … … 412 412 return -1; 413 413 } 414 415 // Set the socket to be non-blocking 416 if (-1 == (flags = fcntl(sockfd, F_GETFL, 0))) 417 { 418 flags = 0; 419 } 420 fcntl(sockfd, F_SETFL, flags | O_NONBLOCK); 414 421 415 422 printf("Connected to server %s port %d waiting for message from server\r\n", IP_ADDR, IP_PORT);