diff options
Diffstat (limited to 'src/server.cc')
-rw-r--r-- | src/server.cc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/server.cc b/src/server.cc index 892b2e9..6d4d26b 100644 --- a/src/server.cc +++ b/src/server.cc @@ -56,9 +56,6 @@ void newConnection(Socket *socket, Info *info) { - // We need to create the end of stream frame. - if(endOfFrameStream == NULL) endOfFrameStream = new Frame(NULL, 1); - char cpr[256]; bool hasCpr = false; ServerStatus status(info); @@ -88,14 +85,6 @@ void newConnection(Socket *socket, Info *info) hasCpr = true; } - // printf("Read: %d bytes ", ret); - // printf("typ: %d ", h.header_type); -// fprintf(stdout, "cpr: %s ", cpr); -// fprintf(stdout, "frz: %d ", h.header.h_data.freeze); -// fprintf(stdout, "sht: %d ", h.header.h_data.snapshot); -// fprintf(stdout, "save: %d ", h.header.h_data.savestate); -// fflush(stdout); - if(h.header.h_data.snapshot) { if(freeze_frame) { ImgEncoder(cpr, info).encode(freeze_frame, 100); @@ -130,6 +119,10 @@ void newConnection(Socket *socket, Info *info) info->info("Closing connection..."); + // Send end of stream frame. + frame->endOfFrameStream = true; + enc->encode(frame); + if(enc) delete enc; info->info("Connection closed"); |