/*
RTMP Server
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/select.h>
#include "rtmp.h"
amfHeader_real *AMFS = 0x0;
int main(int argc,char **argv) {
fd_set readset;
int readSocks = 0x0;
AMFS = (amfHeader_real *)malloc(sizeof(amfHeader_real) * 128);
sStartListener();
while (1) {
sGetConnections(&readset);
readSocks = select(highSock+1,&readset,0x0,0x0,0x0);
if (readSocks < 0) {
perror("select failed");
exit(0x0);
}
else if (readSocks > 0)
sProcessConnections(&readset);
}
return(0);
}