设置和获取socket buffer size

 

  int nrcvbuf=8192*2; //and now the default buffer is 8192  
  setsockopt(Socket,SOL_SOCKET,SO_RCVBUF,(char *)&nrcvbuf,sizeof(nrcvbuf)); 
 
 
  int nRB = 0;  
  int Length = sizeof(int);  
  getsockopt(Socket,SOL_SOCKET,SO_RCVBUF,(char *)&nRB,&Length);

 

你可能感兴趣的:(socket,buffer)