diff options
Diffstat (limited to 'server/server.cc')
-rw-r--r-- | server/server.cc | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/server/server.cc b/server/server.cc index 9af22d9..27e5eef 100644 --- a/server/server.cc +++ b/server/server.cc @@ -25,7 +25,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include "server.h" -#include "miav_server.h" + +#include "network.h" #include <stdio.h> #include <stdlib.h> @@ -57,6 +58,28 @@ void newConnection(Socket *socket) { + Network network(socket); + + MIaV::info->info("CONNECTION OPENED"); + MIaV::info->info("New connection (%s)", inet_ntoa(socket->socketaddr.sin_addr)); + + Frame *frame; + while((frame = network.recvFrame())) { + + sleep(1); + + if(frame->vframe) delete frame->vframe; + if(frame->aframe) delete frame->aframe; + delete frame; + } + + MIaV::info->info("CONNECTION CLOSED"); +} + + +/* +void newConnection(Socket *socket) +{ char cpr[256]; char clientip[64]; bool hasCpr = false; @@ -135,3 +158,4 @@ void newConnection(Socket *socket) MIaV::info->info("CONNECTION CLOSED"); } +*/ |