100 :
TSocket(host, port, (
Int_t)(size > 1 ? -1 : tcpwindowsize))
119 char *pauth = (
char *)strstr(host,
"?A");
135 Int_t tcpw = (size > 1 ? -1 : tcpwindowsize);
139 gROOT->GetListOfSockets()->Remove(ns);
215 char *pauth = (
char *)strstr(host,
"?A");
235 gROOT->GetListOfSockets()->Remove(ns);
268 gROOT->GetListOfSockets()->Add(
this);
297 for (
int i = 0; i <
fSize; i++) {
310 gROOT->GetListOfSockets()->Add(
this);
348 for (
int i = 0; i <
fSize; i++) {
358 gROOT->GetListOfSockets()->Remove(
this);
394 Warning(
"Init",
"%p: problems sending (0,0)", sock);
397 Warning(
"Init",
"problems sending (0,0)");
414 Warning(
"Init",
"%p: problems sending size", sock);
417 Warning(
"Init",
"problems sending size");
423 for (i = 0; i <
fSize; i++) {
448 for (i = 0; i <
fSize; i++) {
502 Error(
"Send",
"cannot send a message used for reading");
515 const_cast<TMessage&>(mess).SetCompressionSettings(
fCompress);
518 const_cast<TMessage&>(mess).Compress();
520 char *mbuf = mess.
Buffer();
541 if (strncmp(buf,
"ok", 2)) {
542 Error(
"Send",
"bad acknowledgement");
582 for (i = 0; i < nsocks; i++) {
592 for (
int is = 0; is < nsocks; is++) {
654 char *buf =
new char[len+
sizeof(
UInt_t)];
672 char ok[2] = {
'o',
'k' };
716 for (i = 0; i < nsocks; i++) {
728 for (
int is = 0; is < nsocks; is++) {
769 for (
int i = 0; i <
fSize; i++)
783 for (
int i = 0; i <
fSize; i++)
virtual const char * GetName() const
Returns name of object.
Int_t GetServType() const
virtual Bool_t IsValid() const
Bool_t RecvStreamerInfos(TMessage *mess)
Receive a message containing streamer infos.
Int_t GetCompressionLevel() const
char * CompBuffer() const
UInt_t GetBytesRecv() const
Bool_t RecvProcessIDs(TMessage *mess)
Receive a message containing process ids.
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
This class represents a WWW compatible URL.
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
virtual void SetName(const char *name)
Set the name of the TNamed.
void Close(Option_t *opt="")
Close a parallel socket.
virtual Int_t GetLocalPort()
Get port # to which server socket is bound. In case of error returns -1.
This class represents an Internet Protocol (IP) address.
Option_t * GetOption() const
virtual void CloseConnection(int sock, Bool_t force=kFALSE)
Close socket connection.
virtual void Add(TSocket *sock, Int_t interest=kRead)
Add socket to the monitor's active list.
Int_t Send(const TMessage &mess)
Send a TMessage object.
void SendStreamerInfos(const TMessage &mess)
Check if TStreamerInfo must be sent.
virtual ~TPSocket()
Cleanup the parallel socket.
R__EXTERN TVirtualMutex * gROOTMutex
Option_t * GetOption() const
virtual void DeActivateAll()
De-activate all activated sockets.
TInetAddress fLocalAddress
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.
UShort_t net2host(UShort_t x)
void SetWhat(UInt_t what)
Using this method one can change the message type a-posteriory.
TPSocket(TSocket *pSockets[], Int_t size)
Create a parallel socket. This ctor is called by TPServerSocket.
virtual TSocket * Accept(UChar_t Opt=0)
Accept a connection on a server socket.
Int_t GetRemoteProtocol() const
TSocket * Select()
Return pointer to socket for which an event is waiting.
virtual void Close(Option_t *opt="")
Close the socket.
Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt)
Send a raw buffer of specified length.
R__EXTERN TSystem * gSystem
UInt_t GetBytesSent() const
Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt)
Send a raw buffer of specified length.
Int_t GetDescriptor() const
Return socket descriptor.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Int_t GetErrorCode() const
Returns error code.
virtual void Activate(TSocket *sock)
Activate a de-activated socket.
virtual TInetAddress GetLocalInetAddress()
Return internet address of local host to which the socket is bound.
Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
static constexpr double s
#define R__LOCKGUARD(mutex)
virtual TInetAddress GetSockName(int sock)
Get Internet Protocol (IP) address of host and port #.
Int_t GetCompressionLevel() const
void SetLength() const
Set the message length at the beginning of the message buffer.
Int_t GetErrorCode() const
Returns error code.
TSecContext * GetSecContext() const
void SendProcessIDs(const TMessage &mess)
Check if TProcessIDs must be sent.
TInetAddress GetLocalInetAddress()
Return internet address of local host to which the socket is bound.
Int_t Recv(TMessage *&mess)
Receive a TMessage object.
virtual Int_t GetDescriptor() const
TInetAddress GetInetAddress() const
void SetUrl(const char *url)
Int_t GetCompressionSettings() const
Int_t GetTcpWindowSize() const
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
void Init(Int_t tcpwindowsize, TSocket *sock=0)
Create a parallel socket to the specified host.
static constexpr double ns
const char * GetService() const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
TSecContext * fSecContext
Bool_t Authenticate(const char *user)
Authenticated the socket with specified user.
virtual const char * GetTitle() const
Returns title of object.