ATLAS Offline Software
Loading...
Searching...
No Matches
TSocket.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2//
3// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4//
5#ifndef XAODROOTACCESS_TOOLS_TSOCKET_H
6#define XAODROOTACCESS_TOOLS_TSOCKET_H
7
8// Local include(s):
10
11// Forward declaration(s):
12class TString;
13class TInetAddress;
14
15namespace xAOD {
16
29 class TSocket {
30
31 public:
33 TSocket();
35 ~TSocket();
36
38 TSocket( const TSocket& ) = delete;
40 TSocket& operator=( const TSocket& ) = delete;
41
43 StatusCode connect( const TInetAddress& address, int port );
45 StatusCode close();
46
48 bool isConnected() const;
49
51 StatusCode send( const TString& payload );
52
53 private:
56
57 }; // class TSocket
58
59} // namespace xAOD
60
61#endif // XAODROOTACCESS_TOOLS_TSOCKET_H
TSocket(const TSocket &)=delete
Do not allow object copying.
StatusCode send(const TString &payload)
Function sending a message to the connected address.
Definition TSocket.cxx:122
StatusCode connect(const TInetAddress &address, int port)
Function connecting to the specified address.
Definition TSocket.cxx:48
TSocket()
Constructor with an address and a port.
Definition TSocket.cxx:26
bool isConnected() const
Check if the socket is connected to some address at the moment.
Definition TSocket.cxx:111
StatusCode close()
Close the current connection.
Definition TSocket.cxx:94
TSocket & operator=(const TSocket &)=delete
Do not allow assignment.
int m_socket
The underlying socket.
Definition TSocket.h:55
~TSocket()
Destructor.
Definition TSocket.cxx:31
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.