Allow socket reuse
This commit is contained in:
parent
2529d5c0f0
commit
ed9c933951
1 changed files with 2 additions and 0 deletions
|
@ -12,6 +12,8 @@ bool socketError = false;
|
|||
|
||||
int DDV_OpenUnix(const char adres[], bool nonblock = false){
|
||||
int s = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
int on = 1;
|
||||
setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
|
||||
sockaddr_un addr;
|
||||
addr.sun_family = AF_UNIX;
|
||||
strcpy(addr.sun_path, adres);
|
||||
|
|
Loading…
Add table
Reference in a new issue