Skip to content
Snippets Groups Projects
Commit fb6b8936 authored by John Hodge (sonata)'s avatar John Hodge (sonata)
Browse files

AcessNative - Set SO_REUSEADDR

parent 8b72370e
No related merge requests found
......@@ -228,6 +228,13 @@ int SyscallServer(void)
server.sin_port = htons(SERVER_PORT);
server.sin_addr.s_addr = htonl(INADDR_ANY);
#if USE_TCP
{
int val = 1;
setsockopt(gSocket, SOL_SOCKET, SO_REUSEADDR, &val, sizeof val);
}
#endif
// Bind
if( bind(gSocket, (struct sockaddr *)&server, sizeof(struct sockaddr_in)) == -1 )
{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment