Compilende versie RTMP superconnector
This commit is contained in:
parent
e04bb3efde
commit
55f72227c6
3 changed files with 5 additions and 20 deletions
|
@ -12,7 +12,7 @@ bool inited = false;
|
|||
bool stopparsing = false;
|
||||
timeval lastrec;
|
||||
|
||||
int CONN = 0;
|
||||
FILE * CONN = 0;
|
||||
#include "parsechunks.cpp" //chunkstream parsing
|
||||
#include "handshake.cpp" //handshaking
|
||||
#include "../util/flv_sock.cpp" //FLV parsing with SocketW
|
||||
|
@ -43,7 +43,6 @@ int main(){
|
|||
|
||||
//first timestamp set
|
||||
firsttime = getNowMS();
|
||||
int teller = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Doing handshake...\n");
|
||||
|
|
14
PLS
14
PLS
|
@ -12,20 +12,6 @@ service ddvtechhttp
|
|||
cps = 100 5
|
||||
}
|
||||
|
||||
service ddvtechrtmp
|
||||
{
|
||||
disable = no
|
||||
type = UNLISTED
|
||||
protocol = tcp
|
||||
socket_type = stream
|
||||
user = root
|
||||
server = /usr/bin/Connector_RTMP
|
||||
port = 1935
|
||||
wait = no
|
||||
per_source = 10
|
||||
cps = 100 5
|
||||
}
|
||||
|
||||
service ddvtechraw
|
||||
{
|
||||
disable = no
|
||||
|
|
|
@ -14,9 +14,9 @@ int DDV_Listen(int port){
|
|||
addr.sin_family = AF_INET;
|
||||
addr.sin_port = htons(port);//port 8888
|
||||
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){
|
||||
ret = listen(sock, 100);//start listening, backlog of 100 allowed
|
||||
ret = listen(s, 100);//start listening, backlog of 100 allowed
|
||||
if (ret == 0){
|
||||
return s;
|
||||
}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);
|
||||
if (r != -1){
|
||||
return fdopen(r, "r+");
|
||||
}else{
|
||||
return -1;
|
||||
return (FILE*)0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue