Compilende versie RTMP superconnector
This commit is contained in:
parent
5af9fd2674
commit
b210630fcc
1 changed files with 4 additions and 4 deletions
|
@ -14,9 +14,9 @@ int DDV_Listen(int port){
|
||||||
addr.sin_family = AF_INET;
|
addr.sin_family = AF_INET;
|
||||||
addr.sin_port = htons(port);//port 8888
|
addr.sin_port = htons(port);//port 8888
|
||||||
inet_pton(AF_INET, "0.0.0.0", &addr.sin_addr);//listen on all interfaces
|
inet_pton(AF_INET, "0.0.0.0", &addr.sin_addr);//listen on all interfaces
|
||||||
ret = bind(sock, (sockaddr*)&addr, sizeof(addr));//bind to all interfaces, chosen port
|
int ret = bind(s, (sockaddr*)&addr, sizeof(addr));//bind to all interfaces, chosen port
|
||||||
if (ret == 0){
|
if (ret == 0){
|
||||||
ret = listen(sock, 100);//start listening, backlog of 100 allowed
|
ret = listen(s, 100);//start listening, backlog of 100 allowed
|
||||||
if (ret == 0){
|
if (ret == 0){
|
||||||
return s;
|
return s;
|
||||||
}else{
|
}else{
|
||||||
|
@ -31,11 +31,11 @@ int DDV_Listen(int port){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int DDV_Accept(int sock){
|
FILE * DDV_Accept(int sock){
|
||||||
int r = accept(sock, 0, 0);
|
int r = accept(sock, 0, 0);
|
||||||
if (r != -1){
|
if (r != -1){
|
||||||
return fdopen(r, "r+");
|
return fdopen(r, "r+");
|
||||||
}else{
|
}else{
|
||||||
return -1;
|
return (FILE*)0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue