Web lists-archives.com

NSPR API problem - Following code block using PR_SetSocketOption makes PR_Accept fail with the error code -5998 which is for "The operation would have blocked" by the macro PR_WOULD_BLOCK_ERROR




PRSocketOptionData Options;

   Options.value.reuse_addr = 1;
   
   _R = PR_SetSocketOption(ServerFD, &Options );
   
   if(_R == PR_FAILURE)
   {
      Status  (ERROR, "Failed to set socket option for 'REUSE ADDRESS'");
      PR_Close(ServerFD);

      return FAILURE;
   }


I am currently developing a HTTP server with NSPR. And i noticed this block of code makes the PR_Accept return failure. What is the problem?
_______________________________________________
general mailing list
general@xxxxxxxxxxxxxxxxx
https://lists.mozilla.org/listinfo/general