#include <Socket.h>
Inheritance diagram for Socket:
Public Types | |
enum | SocketShutdownMode { ShutdownReceive = 0x00, ShutdownSend = 0x01, ShutdownBoth = 0x02 } |
Public Member Functions | |
virtual | ~Socket () |
bool | operator== (const Socket &socket) const throw () |
bool | operator< (const Socket &socket) const throw () |
std::ostream & | operator<< (std::ostream &stream) const |
bool | isOpen () const throw () |
void | close () |
bool | isAutoClosing () const throw () |
void | setToAutoClose (bool autoClose) throw () |
void | bind (const SocketAddress &address) |
void | shutdownSocketSends () |
void | shutdownSocketReceives () |
void | shutdown () |
void | shutdown (SocketShutdownMode code) |
int | getSocketType () const |
SocketAddress | getSocketAddress () const |
operator SOCKET () const throw () | |
SOCKET | getDescriptor () const throw () |
void | setDescriptor (SOCKET socketHandle) throw () |
int | getReceivingBufferSize () const |
void | setReceivingBufferSize (int size) |
int | getSendingBufferSize () const |
void | setSendingBufferSize (int newBufferSize) |
int | getAndClearErrorStatus () |
bool | getLingerInformation (int &seconds) const |
void | setLingerInformation (bool flag, int seconds) |
bool | getRouting () const |
void | setRouting (bool flag) |
bool | canLocalAddressesBeReused () const |
void | setReuseLocalAddresses (bool flag) |
Protected Member Functions | |
Socket (SOCKET descriptor) | |
Socket (int type, int domain, int protocol=0) | |
void | reset (int type, int domain, int protocol=0) |
void | bind (sockaddr *address, int size) |
void | name (sockaddr *address, int &size) const |
int | getOption (int code) const |
void | getOption (int code, void *storage, int &size) const |
void | setOption (int code, int value) |
void | setOption (int code, void *storage, int size) |
bool | getBoolOption (int code) const |
void | setBoolOption (int code, bool flag) |
Protected Attributes | |
SOCKET | socketHandle |
bool | autoClosing |
short | flags_ |
Definition at line 75 of file Socket.h.
|
|
|
Definition at line 169 of file Socket.cpp. References close(), and isAutoClosing(). |
|
Definition at line 64 of file Socket.cpp. |
|
Definition at line 157 of file Socket.cpp. References setDescriptor(), and SOCKET_CALL_3. |
|
Definition at line 207 of file Socket.cpp. References bind(), getDescriptor(), and SOCKET_CALL_3. |
|
Definition at line 149 of file Socket.cpp. Referenced by bind(), TcpConnectionServer::TcpConnectionServer(), and TcpSocket::TcpSocket(). |
|
Definition at line 125 of file Socket.cpp. References getBoolOption(). |
|
Definition at line 288 of file Socket.cpp. References closesocket, and socketHandle. Referenced by TcpConnectionServer::accept(), processSocket(), reset(), SOAPonHTTP::send(), and ~Socket(). |
|
Definition at line 106 of file Socket.cpp. References getOption(). |
|
Definition at line 82 of file Socket.cpp. References getOption(). Referenced by canLocalAddressesBeReused(), getRouting(), and TcpSocket::keepAlive(). |
|
Definition at line 40 of file Socket.cpp. References socketHandle. Referenced by TcpConnectionServer::accept(), bind(), ConnectableSocket::connectTo(), getOption(), isOpen(), TcpConnectionServer::listen(), name(), operator<<(), ConnectableSocket::operator<<(), ConnectableSocket::peerAddress(), ConnectableSocket::receiveFrom(), setOption(), and shutdown(). |
|
Definition at line 224 of file Socket.cpp. References getOption(). |
|
Definition at line 311 of file Socket.cpp. References getDescriptor(), and SOCKET_CALL_5. |
|
Definition at line 214 of file Socket.cpp. Referenced by getAndClearErrorStatus(), getBoolOption(), getLingerInformation(), getReceivingBufferSize(), getSendingBufferSize(), and getSocketType(). |
|
Definition at line 181 of file Socket.cpp. References getOption(). Referenced by processSocket(). |
|
Definition at line 113 of file Socket.cpp. References getBoolOption(). |
|
Definition at line 194 of file Socket.cpp. References getOption(). |
|
Definition at line 244 of file Socket.cpp. References name(). |
|
Definition at line 100 of file Socket.cpp. References getOption(). |
|
Definition at line 137 of file Socket.cpp. References autoClosing. Referenced by ~Socket(). |
|
Definition at line 58 of file Socket.cpp. References getDescriptor(). Referenced by ConnectableSocket::isOk(), operator<<(), and ConnectableSocket::operator<<(). |
|
Definition at line 325 of file Socket.cpp. References getDescriptor(), and SOCKET_CALL_3. Referenced by getSocketAddress(). |
|
Definition at line 75 of file Socket.cpp. References socketHandle. |
|
Definition at line 52 of file Socket.cpp. |
|
TcpServer Socket library Copyright (c) 2000 Jasen Plietz All rights reserved. No warranties are extended. Use at your own risk. To contact the author with suggestions or comments, use Jasen@plietz.net Reimplemented in ConnectableSocket. Definition at line 28 of file Socket.cpp. References getDescriptor(), and isOpen(). |
|
Definition at line 46 of file Socket.cpp. |
|
Definition at line 295 of file Socket.cpp. References close(), setDescriptor(), and SOCKET_CALL_3. Referenced by TcpSocket::reset(). |
|
Definition at line 94 of file Socket.cpp. References setOption(). Referenced by TcpSocket::setKeepAlives(), setReuseLocalAddresses(), and setRouting(). |
|
Definition at line 69 of file Socket.cpp. Referenced by TcpConnectionServer::accept(), reset(), and Socket(). |
|
Definition at line 234 of file Socket.cpp. References setOption(). |
|
Definition at line 280 of file Socket.cpp. References getDescriptor(), and SOCKET_CALL_5. |
|
Definition at line 88 of file Socket.cpp. Referenced by setBoolOption(), setLingerInformation(), setReceivingBufferSize(), and setSendingBufferSize(). |
|
Definition at line 188 of file Socket.cpp. References setOption(). |
|
Definition at line 131 of file Socket.cpp. References setBoolOption(). Referenced by TcpConnectionServer::TcpConnectionServer(). |
|
Definition at line 119 of file Socket.cpp. References setBoolOption(). |
|
Definition at line 201 of file Socket.cpp. References setOption(). |
|
Definition at line 143 of file Socket.cpp. |
|
Definition at line 272 of file Socket.cpp. References getDescriptor(), shutdown(), and SOCKET_CALL_2. |
|
Definition at line 266 of file Socket.cpp. References ShutdownBoth. Referenced by shutdown(), shutdownSocketReceives(), and shutdownSocketSends(). |
|
Definition at line 254 of file Socket.cpp. References shutdown(), and ShutdownReceive. |
|
Definition at line 260 of file Socket.cpp. References shutdown(), and ShutdownSend. |
|
Definition at line 197 of file Socket.h. Referenced by isAutoClosing(). |
|
Definition at line 200 of file Socket.h. Referenced by ConnectableSocket::clear(), ConnectableSocket::eventOnEof(), ConnectableSocket::getFlags(), ConnectableSocket::isEof(), ConnectableSocket::isOk(), ConnectableSocket::read(), ConnectableSocket::receiveFrom(), and ConnectableSocket::write(). |
|
Definition at line 194 of file Socket.h. Referenced by close(), getDescriptor(), operator SOCKET(), ConnectableSocket::read(), and ConnectableSocket::write(). |