groupsock/IOHandlers.cpp File Reference

#include "IOHandlers.hh"
#include "TunnelEncaps.hh"

Include dependency graph for IOHandlers.cpp:

Go to the source code of this file.

Functions

void socketReadHandler (Socket *sock, int)

Variables

static unsigned const maxPacketLength = 50*1024
static unsigned const ioBufferSize = maxPacketLength + TunnelEncapsulationTrailerMaxSize
static unsigned char ioBuffer [ioBufferSize]


Function Documentation

void socketReadHandler ( Socket sock,
int   
)

Definition at line 38 of file IOHandlers.cpp.

References Socket::env(), Socket::handleRead(), ioBuffer, ioBufferSize, and UsageEnvironment::reportBackgroundError().

00038                                                    {
00039   unsigned bytesRead;
00040   struct sockaddr_in fromAddress;
00041   UsageEnvironment& saveEnv = sock->env();
00042       // because handleRead(), if it fails, may delete "sock"
00043   if (!sock->handleRead(ioBuffer, ioBufferSize, bytesRead, fromAddress)) {
00044     saveEnv.reportBackgroundError();
00045   }
00046 }


Variable Documentation

unsigned char ioBuffer[ioBufferSize] [static]

Definition at line 35 of file IOHandlers.cpp.

Referenced by socketReadHandler().

unsigned const ioBufferSize = maxPacketLength + TunnelEncapsulationTrailerMaxSize [static]

Definition at line 34 of file IOHandlers.cpp.

Referenced by socketReadHandler().

unsigned const maxPacketLength = 50*1024 [static]

Definition at line 26 of file IOHandlers.cpp.


Generated on Tue Oct 7 15:38:20 2008 for live by  doxygen 1.5.2