Barracuda Application Server C/C++ Reference
NO
|
Contains information about the physical socket connection.
This object is used internally by HttpServer when sending and receiving data on either an insecure or secure SSL connection.
#include <SoDispCon.h>
Public Member Functions | |
int | connect (const char *host, U16 port, const void *bindIntfName=0, U16 bindPort=0, U32 timeout=1500, BaBool dgram=false, BaBool ipv6=false, char **errinfo=0) |
Connect to host/IP address. More... | |
bool | isSecure () |
Deprecated: Use getSharkSslCon(NULL). | |
bool | getSharkSslCon (SharkSslCon **sc) |
Returns true if this is an SSL connection. More... | |
bool | isValid () |
Returns true if the socket connection is valid. | |
bool | isIP6 () |
Returns true if this is an IP version 6 connection. | |
int | getPeerName (HttpSockaddr *addr, U16 *port=0) |
Returns the 'peer' IP address. More... | |
int | getSockName (HttpSockaddr *addr, U16 *port=0) |
Returns the 'sock' IP address. More... | |
char * | addr2String (HttpSockaddr *addr, char *buf, int len) |
Converts IP address to string. | |
bool | cmpAddr (HttpSockaddr *addr2) |
Compare addr with address returned by getPeerName. | |
void | setTCPNoDelay (bool enable) |
Disable the TCP delay. More... | |
struct SoDisp * | getDispatcher () |
Fetch the SoDisp object. | |
bool | hasMoreData () |
Returns true if more data on the socket. | |
bool | dispatcherHasCon () |
Returns true if connection is in the SoDisp object. | |
bool | recEvActive () |
Returns true if the connection is active in the SoDisp object. | |
bool | sendEvActive () |
Used for non blocking send. | |
int SoDispCon::connect | ( | const char * | host, |
U16 | port, | ||
const void * | bindIntfName = 0 , |
||
U16 | bindPort = 0 , |
||
U32 | timeout = 1500 , |
||
BaBool | dgram = false , |
||
BaBool | ipv6 = false , |
||
char ** | errinfo = 0 |
||
) |
Connect to host/IP address.
host | the host/IP address. |
port | the port number or service. |
bindIntfName | the interface to bind this socket to. |
dgram | defaults to false (TCP). |
bindPort | optionally bind to specific port |
timeout | in milliseconds |
ipv6 | defaults to false. |
errinfo | may be set to platform error. |
int SoDispCon::getPeerName | ( | HttpSockaddr * | addr, |
U16 * | port = 0 |
||
) |
Returns the 'peer' IP address.
bool SoDispCon::getSharkSslCon | ( | SharkSslCon ** | sc | ) |
Returns true if this is an SSL connection.
sc | is set to the SharkSslCon object. |
int SoDispCon::getSockName | ( | HttpSockaddr * | addr, |
U16 * | port = 0 |
||
) |
Returns the 'sock' IP address.
void SoDispCon::setTCPNoDelay | ( | bool | enable | ) |
Disable the TCP delay.
What TCP normally does is queue up data so it only sends full packets out when possible. (This is called Nagle�s algorithm.) Call this function if you do not want that behavior.