#include <TcpSocket.h>


Public Member Functions | |
| TcpSocket (const string &host, int portVal) | |
| TcpSocket (int portVal) | |
| TcpSocket (int socket, struct sockaddr *addr) | |
| virtual | ~TcpSocket () |
| virtual void | connect () |
| virtual void | listen () |
| virtual Socket * | newSocket (int socket, struct sockaddr *addr) |
| virtual void | dump (ostream &strm) const |
| dumps information about this object | |
| virtual bool | isConnected () |
| virtual bool | isListening () |
| virtual void | close () |
| virtual void | send (const string &str, int start, int end) |
| virtual int | receive (char *inBuff, int inSize) |
| virtual void | sync () |
| virtual int | getSocketDescriptor () |
| unsigned int | getPort () |
| string | getIp () |
Protected Attributes | |
| int | _socket |
| bool | _connected |
| bool | _listening |
| string | _ip |
| unsigned int | _port |
| bool | _addr_set |
| TcpSocket::TcpSocket | ( | const string & | host, | |
| int | portVal | |||
| ) | [inline] |
Referenced by newSocket().
| TcpSocket::TcpSocket | ( | int | portVal | ) | [inline] |
| TcpSocket::TcpSocket | ( | int | socket, | |
| struct sockaddr * | addr | |||
| ) | [inline] |
| virtual TcpSocket::~TcpSocket | ( | ) | [inline, virtual] |
| void Socket::close | ( | ) | [virtual, inherited] |
Reimplemented in UnixSocket.
References Socket::_connected, Socket::_listening, and Socket::_socket.
Referenced by PPTServer::closeConnection(), PPTClient::closeConnection(), ServerApp::terminate(), and Socket::~Socket().
| void TcpSocket::connect | ( | ) | [virtual] |
| void TcpSocket::dump | ( | ostream & | strm | ) | const [virtual] |
dumps information about this object
Displays the pointer value of this instance
| strm | C++ i/o stream to dump the information to |
Reimplemented from Socket.
References BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().
Referenced by ServerApp::dump().

| string Socket::getIp | ( | ) | [inline, inherited] |
References Socket::_ip.
| unsigned int Socket::getPort | ( | ) | [inline, inherited] |
References Socket::_port.
| virtual int Socket::getSocketDescriptor | ( | ) | [inline, virtual, inherited] |
References Socket::_socket.
Referenced by SocketListener::accept(), SocketListener::listen(), and PPTConnection::readBufferNonBlocking().
| virtual bool Socket::isConnected | ( | ) | [inline, virtual, inherited] |
References Socket::_connected.
Referenced by Connection::isConnected(), SocketListener::listen(), and PPTClient::PPTClient().
| virtual bool Socket::isListening | ( | ) | [inline, virtual, inherited] |
| void TcpSocket::listen | ( | ) | [virtual] |
| virtual Socket* TcpSocket::newSocket | ( | int | socket, | |
| struct sockaddr * | addr | |||
| ) | [inline, virtual] |
| int Socket::receive | ( | char * | inBuff, | |
| int | inSize | |||
| ) | [virtual, inherited] |
| void Socket::send | ( | const string & | str, | |
| int | start, | |||
| int | end | |||
| ) | [virtual, inherited] |
| void Socket::sync | ( | ) | [virtual, inherited] |
bool Socket::_addr_set [protected, inherited] |
Referenced by Socket::dump().
bool Socket::_connected [protected, inherited] |
Referenced by UnixSocket::close(), Socket::close(), UnixSocket::connect(), connect(), Socket::dump(), Socket::isConnected(), UnixSocket::listen(), and listen().
string Socket::_ip [protected, inherited] |
Referenced by Socket::dump(), Socket::getIp(), and Socket::Socket().
bool Socket::_listening [protected, inherited] |
Referenced by UnixSocket::close(), Socket::close(), UnixSocket::connect(), connect(), Socket::dump(), Socket::isListening(), UnixSocket::listen(), and listen().
unsigned int Socket::_port [protected, inherited] |
Referenced by Socket::dump(), Socket::getPort(), and Socket::Socket().
int Socket::_socket [protected, inherited] |
1.5.8