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-2026 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// System include(s).
12#include <cstddef>
13
14// Forward declaration(s):
15class TString;
16class TInetAddress;
17
18namespace xAOD {
19
32class TSocket {
33
34 public:
36 TSocket();
38 ~TSocket();
39
41 TSocket(const TSocket&) = delete;
43 TSocket& operator=(const TSocket&) = delete;
44
46 StatusCode connect(const TInetAddress& address, int port);
48 StatusCode close();
49
51 bool isConnected() const;
52
54 StatusCode send(const TString& payload);
55
57 StatusCode receive(std::size_t maxSize, TString& response);
58
59 private:
62
63}; // class TSocket
64
65} // namespace xAOD
66
67#endif // XAODROOTACCESS_TOOLS_TSOCKET_H
MDT_Response response
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:119
StatusCode connect(const TInetAddress &address, int port)
Function connecting to the specified address.
Definition TSocket.cxx:45
StatusCode receive(std::size_t maxSize, TString &response)
Function receiving a message from the connected address.
Definition TSocket.cxx:147
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:108
StatusCode close()
Close the current connection.
Definition TSocket.cxx:91
TSocket & operator=(const TSocket &)=delete
Do not allow assignment.
int m_socket
The underlying socket.
Definition TSocket.h:61
~TSocket()
Destructor.
Definition TSocket.cxx:28
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.