DDVSocket edits
This commit is contained in:
parent
8081e4cb66
commit
8420db87ca
1 changed files with 2 additions and 2 deletions
|
@ -13,8 +13,6 @@ bool socketBlocking = 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);
|
||||
|
@ -35,6 +33,8 @@ int DDV_OpenUnix(const char adres[], bool nonblock = false){
|
|||
int DDV_Listen(int port){
|
||||
int s = socket(AF_INET, SOCK_STREAM, 0);
|
||||
|
||||
int on = 1;
|
||||
setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
|
||||
struct sockaddr_in addr;
|
||||
addr.sin_family = AF_INET;
|
||||
addr.sin_port = htons(port);//port 8888
|
||||
|
|
Loading…
Add table
Reference in a new issue