#include <Socket.h>


Public Member Functions | |
| Socket () | |
| Socket (int socket, struct sockaddr *addr) | |
| virtual | ~Socket () |
| virtual void | connect ()=0 |
| virtual bool | isConnected () |
| virtual void | listen ()=0 |
| 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 () |
| virtual Socket * | newSocket (int socket, struct sockaddr *addr)=0 |
| virtual void | dump (ostream &strm) const |
| dumps information about this object | |
Protected Attributes | |
| int | _socket |
| bool | _connected |
| bool | _listening |
| string | _ip |
| unsigned int | _port |
| bool | _addr_set |
| Socket::Socket | ( | ) | [inline] |
| virtual Socket::~Socket | ( | ) | [inline, virtual] |
| void Socket::close | ( | ) | [virtual] |
Reimplemented in UnixSocket.
References _connected, _listening, and _socket.
Referenced by PPTServer::closeConnection(), PPTClient::closeConnection(), ServerApp::terminate(), and ~Socket().
| virtual void Socket::connect | ( | ) | [pure virtual] |
| void Socket::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 |
Implements BESObj.
Reimplemented in TcpSocket, and UnixSocket.
References _addr_set, _connected, _ip, _listening, _port, _socket, BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().
Referenced by SocketListener::dump(), and Connection::dump().

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