Facebook
From Hot Parakeet, 3 Months ago, written in C++.
Embed
Download Paste or View Raw
Hits: 118
  1.  if (setsockopt (metadata, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout,
  2.                 sizeof(timeout)) < 0)
  3.         perror("setsockopt failed\n");
  4.  
  5.     if (setsockopt (metadata, SOL_SOCKET, SO_SNDTIMEO, (char *)&timeout,
  6.                 sizeof(timeout)) < 0)
  7.         perror("setsockopt failed\n");