#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] |
| 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 }
unsigned char ioBuffer[ioBufferSize] [static] |
unsigned const ioBufferSize = maxPacketLength + TunnelEncapsulationTrailerMaxSize [static] |
unsigned const maxPacketLength = 50*1024 [static] |
Definition at line 26 of file IOHandlers.cpp.
1.5.2