#include <TcpSocket.h>
Inheritance diagram for TcpSocket:
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 int | getSocketDescriptor () |
unsigned int | getPort () |
string | getIp () |
Protected Attributes | |
int | _socket |
bool | _connected |
bool | _listening |
string | _ip |
unsigned int | _port |
bool | _addr_set |
Definition at line 42 of file TcpSocket.h.
TcpSocket::TcpSocket | ( | const string & | host, | |
int | portVal | |||
) | [inline] |
TcpSocket::TcpSocket | ( | int | portVal | ) | [inline] |
Definition at line 52 of file TcpSocket.h.
TcpSocket::TcpSocket | ( | int | socket, | |
struct sockaddr * | addr | |||
) | [inline] |
Definition at line 56 of file TcpSocket.h.
virtual TcpSocket::~TcpSocket | ( | ) | [inline, virtual] |
Definition at line 61 of file TcpSocket.h.
void TcpSocket::connect | ( | ) | [virtual] |
Implements Socket.
Definition at line 47 of file TcpSocket.cc.
References Socket::_connected, Socket::_listening, and Socket::_socket.
void TcpSocket::listen | ( | ) | [virtual] |
Implements Socket.
Definition at line 253 of file TcpSocket.cc.
References Socket::_connected, Socket::_listening, and Socket::_socket.
virtual Socket* TcpSocket::newSocket | ( | int | socket, | |
struct sockaddr * | addr | |||
) | [inline, virtual] |
Implements Socket.
Definition at line 65 of file TcpSocket.h.
References TcpSocket().
Here is the call graph for this function:
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.
Definition at line 350 of file TcpSocket.cc.
References Socket::dump(), BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().
Referenced by ServerApp::dump().
Here is the call graph for this function:
virtual bool Socket::isConnected | ( | ) | [inline, virtual, inherited] |
Definition at line 63 of file Socket.h.
References Socket::_connected.
Referenced by Connection::isConnected(), SocketListener::listen(), and PPTClient::PPTClient().
virtual bool Socket::isListening | ( | ) | [inline, virtual, inherited] |
Definition at line 65 of file Socket.h.
References Socket::_listening.
Referenced by SocketListener::listen().
void Socket::close | ( | ) | [virtual, inherited] |
Reimplemented in UnixSocket.
Definition at line 70 of file Socket.cc.
References Socket::_connected, Socket::_listening, and Socket::_socket.
Referenced by UnixSocket::close(), PPTServer::closeConnection(), PPTClient::closeConnection(), ServerApp::terminate(), and Socket::~Socket().
void Socket::send | ( | const string & | str, | |
int | start, | |||
int | end | |||
) | [virtual, inherited] |
Definition at line 82 of file Socket.cc.
References Socket::_socket.
Referenced by PPTConnection::writeBuffer().
int Socket::receive | ( | char * | inBuff, | |
int | inSize | |||
) | [virtual, inherited] |
Definition at line 97 of file Socket.cc.
References Socket::_socket.
Referenced by PPTConnection::readBuffer().
virtual int Socket::getSocketDescriptor | ( | ) | [inline, virtual, inherited] |
Definition at line 69 of file Socket.h.
References Socket::_socket.
Referenced by SocketListener::listen(), and PPTConnection::readBufferNonBlocking().
unsigned int Socket::getPort | ( | ) | [inline, inherited] |
string Socket::getIp | ( | ) | [inline, inherited] |
int Socket::_socket [protected, inherited] |
Definition at line 47 of file Socket.h.
Referenced by Socket::close(), UnixSocket::connect(), connect(), Socket::dump(), Socket::getSocketDescriptor(), UnixSocket::listen(), listen(), Socket::receive(), and Socket::send().
bool Socket::_connected [protected, inherited] |
Definition at line 48 of file Socket.h.
Referenced by UnixSocket::close(), Socket::close(), UnixSocket::connect(), connect(), Socket::dump(), Socket::isConnected(), UnixSocket::listen(), and listen().
bool Socket::_listening [protected, inherited] |
Definition at line 49 of file Socket.h.
Referenced by UnixSocket::close(), Socket::close(), UnixSocket::connect(), connect(), Socket::dump(), Socket::isListening(), UnixSocket::listen(), and listen().
string Socket::_ip [protected, inherited] |
Definition at line 50 of file Socket.h.
Referenced by Socket::dump(), Socket::getIp(), and Socket::Socket().
unsigned int Socket::_port [protected, inherited] |
Definition at line 51 of file Socket.h.
Referenced by Socket::dump(), Socket::getPort(), and Socket::Socket().
bool Socket::_addr_set [protected, inherited] |