xAOD::TSocket Class Reference

#include <TSocket.h>

List of all members.

Public Member Functions

 TSocket ()
 Constructor with an address and a port.
 ~TSocket ()
 Destructor.
TReturnCode connect (const TInetAddress &address, int port)
 Function connecting to the specified address.
TReturnCode close ()
 Close the current connection.
bool isConnected () const
 Check if the socket is connected to some address at the moment.
TReturnCode send (const TString &payload)
 Function sending a message to the connected address.

Detailed Description

Very simple wrapper around POSIX sockets

Since ROOT's TSocket is not fit to be used in TFileAccessTracer's destructor (as some ROOT infrastructure may not be available by the time the destructor is called), we need our own simple implementation instead.

Most of the implementation is simply a copy of the code from TUnixSystem. Slightly simplified in some cases where we don't need the flexibility of the ROOT implementation.

Author:
Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Revision
781356
Date
2016-10-31 15:03:28 +0100 (Mon, 31 Oct 2016)

Member Function Documentation

TReturnCode xAOD::TSocket::connect ( const TInetAddress &  address,
int  port 
)

Function connecting to the specified address.

It turns out that translating a string address name into an integer address that the connect(...) function understands, is no easy feat. So instead we leave that up to ROOT. This translation just needs to be done "early enough" in the job when ROOT can still do it.

Parameters:
address The address to send the data to
port The port number to connect to returns The usual return codes...
TReturnCode xAOD::TSocket::send ( const TString &  payload  ) 

Function sending a message to the connected address.

This function is custom made for our use case. It sends HTML style information to the connected server.

Parameters:
payload The HTML style payload to send to the server
Returns:
The usual return codes...

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Apr 2017 for RootCore Packages by  doxygen 1.6.1