66 if (service && (!
gSystem->AccessPathName(service) ||
70 service[0] ==
'/' || (service[1] ==
':' && service[2] ==
'/'))) {
78 gROOT->GetListOfSockets()->Add(
this);
83 int port =
gSystem->GetServiceByName(service);
88 gROOT->GetListOfSockets()->Add(
this);
129 fSocket =
gSystem->AnnounceTcpService(port, reuse, backlog, tcpwindowsize, socketBindOption);
132 gROOT->GetListOfSockets()->Add(
this);
158 if (
fSocket == -1) {
return 0; }
163 if (soc == -1) {
delete socket;
return 0; }
170 if (
socket->fSocket >= 0) {
int Int_t
Signed integer 4 bytes (int).
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char).
bool Bool_t
Boolean (0=false, 1=true) (bool).
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
externTVirtualMutex * gROOTMutex
ESocketBindOption
Options for binging the sockets created.
@ kInaddrLoopback
Refers to the local host via the loopback device.
#define R__LOCKGUARD(mutex)
This class represents an Internet Protocol (IP) address.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
Bool_t TestBit(UInt_t f) const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Int_t GetLocalPort() override
Get port # to which server socket is bound. In case of error returns -1.
virtual ~TServerSocket()
Destructor: close connection.
virtual TSocket * Accept(UChar_t opt=0)
Accept a connection on a server socket.
TInetAddress GetLocalInetAddress() override
Return internet address of host to which the server socket is bound, i.e.
virtual void Close(Option_t *opt="")
Close the socket.