warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness

The first warning tells you you have the wrong type for parameter 3 of accept. It wants a 'socklen_t *', but you are giving it an 'int *'. Declare client_length to be the right type.

[cpp]  view plain  copy
 print ?
  1.     socklen_t  len=sizeof(struct sockaddr);  
  2. 改为:  
  3.     int  len=sizeof(struct sockaddr);   

你可能感兴趣的:(网络编程)