# Socket Class Reference

`#include <Socket.hh>`

Inheritance diagram for Socket:

[legend]

List of all members.

## Public Types
typedef unsigned long | ByteCount_t
## Public Member Functions
virtual | ~Socket ()
virtual void | createConnection (const char *server_name, unsigned int port)=0 throw (NetworkError)
virtual void | send (const unsigned char *, size_t)=0
virtual void | receive (void *Buffer, unsigned long Size)=0
virtual void | close ()=0
virtual bool | isDataReady () const =0
virtual unsigned long | returnAdress () const =0
virtual int | returnSocket ()=0
## Static Public Member Functions
static const std::string | addr2string (in_addr_t addr)
| This function build a string which represents the provided IPv4 address as a "w.x.y.z".

## Detailed Description

Definition at line 37 of file Socket.hh.

## Member Typedef Documentation

typedef unsigned long ByteCount_t

Definition at line 40 of file Socket.hh.

## Constructor & Destructor Documentation

virtual ~Socket | ( |  | ) | `[inline, virtual]`

Definition at line 41 of file Socket.hh.

## Member Function Documentation

virtual void createConnection | ( | const char * | server_name,
|  | unsigned int | port |
| ) |  |  | throw (NetworkError)`[pure virtual]`

Implemented in SocketHTTPProxy, SocketTCP, and SocketUDP.

virtual void send | ( | const unsigned char * | ,
|  | size_t |  |
| ) |  |  | `[pure virtual]`

Implemented in SecureTCPSocket, SocketMC, SocketTCP, and SocketUDP.

virtual void receive | ( | void * | Buffer,
|  | unsigned long | Size |
| ) |  |  | `[pure virtual]`

Implemented in SecureTCPSocket, SocketMC, SocketTCP, and SocketUDP.

virtual void close | ( |  | ) | `[pure virtual]`

Implemented in SocketMC, SocketTCP, and SocketUDP.

virtual bool isDataReady | ( |  | ) | const`[pure virtual]`

Implemented in SecureTCPSocket, SocketTCP, and SocketUDP.

Referenced by RTIG::execute().

virtual unsigned long returnAdress | ( |  | ) | const`[pure virtual]`

Implemented in SocketMC, SocketTCP, and SocketUDP.

virtual int returnSocket | ( |  | ) | `[pure virtual]`

Implemented in SocketMC, SocketTCP, and SocketUDP.

Referenced by SocketServer::checkMessage(), RTIG::chooseProcessingMethod(), RTIG::closeConnection(), RTIG::execute(), and RTIG::processJoinFederation().

static const std::string addr2string | ( | in_addr_t | addr | ) | `[inline, static]`

This function build a string which represents the provided IPv4 address as a "w.x.y.z".

Parameters:

  `[in]` | addr,the | IPv4 address

Returns:
  the string "w.x.y.z"

Definition at line 68 of file Socket.hh.

Referenced by SocketTCP::createTCPClient(), and SocketTCP::createTCPServer().

The documentation for this class was generated from the following file:

- Socket.hh