Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

12 views
Skip to first unread message

iipe...@gmail.com

unread,
Jul 22, 2018, 7:16:08 AM7/22/18
to

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?
0 new messages