#include <wvtcp.h>
Inheritance diagram for WvTCPConn:
Public Member Functions | |
WvTCPConn (const WvIPPortAddr &_remaddr) | |
WvTCPConn (const WvString &_hostname, __u16 _port=0) | |
virtual | ~WvTCPConn () |
void | nice_tcpopts () |
void | low_delay () |
WvIPPortAddr | localaddr () |
virtual const WvIPPortAddr * | src () const |
bool | isconnected () const |
virtual bool | pre_select (SelectInfo &si) |
virtual bool | post_select (SelectInfo &si) |
virtual bool | isok () const |
WvTCPConn (const WvIPPortAddr &_remaddr) | |
WvTCPConn (const WvString &_hostname, __u16 _port=0) | |
virtual | ~WvTCPConn () |
void | nice_tcpopts () |
void | low_delay () |
WvIPPortAddr | localaddr () |
virtual const WvIPPortAddr * | src () const |
bool | isconnected () const |
virtual bool | pre_select (SelectInfo &si) |
virtual bool | post_select (SelectInfo &si) |
virtual bool | isok () const |
Protected Member Functions | |
WvTCPConn (int _fd, const WvIPPortAddr &_remaddr) | |
void | do_connect () |
void | check_resolver () |
WvTCPConn (int _fd, const WvIPPortAddr &_remaddr) | |
void | do_connect () |
void | check_resolver () |
Protected Attributes | |
bool | resolved |
bool | connected |
WvString | hostname |
WvIPPortAddr | remaddr |
WvResolver | dns |
Friends | |
class | WvTCPListener |
Definition at line 28 of file include/wvtcp.h.
|
Start a WvTCPConn on an already-open socket (used by WvTCPListener) Definition at line 27 of file wvtcp.cc. References connected, WvStream::getfd(), nice_tcpopts(), remaddr, resolved, and WvStream::seterr(). |
|
WvTCPConn tries to make all outgoing connections asynchronously (in the background). You can tell the connection has been established when a select() call returns 'true' with writable==true. Definition at line 17 of file wvtcp.cc. References connected, do_connect(), remaddr, and resolved. |
|
Resolve the hostname, then connect a new socket Definition at line 41 of file wvtcp.cc. References connected, dns, do_connect(), WvString::edit(), WvResolver::findaddr(), hostname, WvIPPortAddr::port, remaddr, and resolved. |
|
Destructor - rarely do you need to call this - close() is a much better way to tear down a TCP Stream ;) |
|
Start a WvTCPConn on an already-open socket (used by WvTCPListener) |
|
WvTCPConn tries to make all outgoing connections asynchronously (in the background). You can tell the connection has been established when a select() call returns 'true' with writable==true. |
|
Resolve the hostname, then connect a new socket |
|
Destructor - rarely do you need to call this - close() is a much better way to tear down a TCP Stream ;) |
|
Resolve the remote address, if it was fed in non-IP form |
|
Resolve the remote address, if it was fed in non-IP form Definition at line 130 of file wvtcp.cc. References dns, do_connect(), WvResolver::findaddr(), WvIPPortAddr::port, remaddr, resolved, and WvStream::seterr(). Referenced by post_select(), and pre_select(). |
|
Connect to the remote end - note the "Protected" above ;) |
|
Connect to the remote end - note the "Protected" above ;) Definition at line 104 of file wvtcp.cc. References WvStream::getfd(), nice_tcpopts(), remaddr, WvStream::rwfd, WvStream::seterr(), WvIPPortAddr::sockaddr(), and WvIPAddr::sockaddr_len(). Referenced by check_resolver(), and WvTCPConn(). |
|
has the connection been completed yet? Definition at line 99 of file ipstreams/wvtcp.h. |
|
has the connection been completed yet? Definition at line 99 of file include/wvtcp.h. Referenced by pre_select(), and WvHTTPStream::pre_select(). |
|
Is this connection OK? Note: isok() will always be true if !resolved, even though fd==-1. Reimplemented from WvStream. |
|
Is this connection OK? Note: isok() will always be true if !resolved, even though fd==-1. Reimplemented from WvStream. Definition at line 230 of file wvtcp.cc. References WvStream::isok(), and resolved. Referenced by localaddr(), and pre_select(). |
|
the local address of this socket (ie. from getsockname()) really useful only for transparent proxies, but always available. may be 0.0.0.0 if we did not bind explicitly! |
|
the local address of this socket (ie. from getsockname()) really useful only for transparent proxies, but always available. may be 0.0.0.0 if we did not bind explicitly! Definition at line 153 of file wvtcp.cc. References WvStream::getfd(), and isok(). |
|
function to set up a TCP socket the way we like In addition to the nice_tcpopts(), set TCP_NODELAY |
|
function to set up a TCP socket the way we like In addition to the nice_tcpopts(), set TCP_NODELAY Definition at line 92 of file wvtcp.cc. References WvStream::getfd(). |
|
function to set up a TCP socket the way we like (Read/Write, Non-Blocking, KeepAlive) |
|
function to set up a TCP socket the way we like (Read/Write, Non-Blocking, KeepAlive) Definition at line 82 of file wvtcp.cc. References WvStream::getfd(). Referenced by do_connect(), and WvTCPConn(). |
|
override post_select() to set the 'connected' variable as soon as we are connected. Reimplemented from WvStream. |
|
override post_select() to set the 'connected' variable as soon as we are connected. Reimplemented from WvStream. Definition at line 197 of file wvtcp.cc. References check_resolver(), connected, WvStream::getfd(), WvStream::post_select(), remaddr, resolved, WvStream::seterr(), WvIPPortAddr::sockaddr(), and WvIPAddr::sockaddr_len(). |
|
override pre_select() to cause select() results when resolving names. Reimplemented from WvStream. |
|
override pre_select() to cause select() results when resolving names. Reimplemented from WvStream. Definition at line 177 of file wvtcp.cc. References check_resolver(), dns, isconnected(), isok(), WvStream::pre_select(), WvResolver::pre_select(), and resolved. |
|
return the remote address (source of all incoming packets), which is a constant for any given TCP connection. Reimplemented from WvStream. |
|
return the remote address (source of all incoming packets), which is a constant for any given TCP connection. Reimplemented from WvStream. Definition at line 171 of file wvtcp.cc. References remaddr. |
|
Definition at line 30 of file include/wvtcp.h. |
|
Definition at line 32 of file ipstreams/wvtcp.h. Referenced by post_select(), and WvTCPConn(). |
|
Definition at line 35 of file ipstreams/wvtcp.h. Referenced by check_resolver(), pre_select(), and WvTCPConn(). |
|
Definition at line 33 of file ipstreams/wvtcp.h. Referenced by WvTCPConn(). |
|
Definition at line 34 of file ipstreams/wvtcp.h. Referenced by check_resolver(), do_connect(), post_select(), src(), and WvTCPConn(). |
|
Definition at line 32 of file ipstreams/wvtcp.h. Referenced by check_resolver(), isok(), post_select(), pre_select(), and WvTCPConn(). |