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");
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++)
UShort_t net2host(UShort_t x)
R__EXTERN TVirtualMutex * gROOTMutex
R__EXTERN TSystem * gSystem
#define R__LOCKGUARD(mutex)
This class represents an Internet Protocol (IP) address.
void SetLength() const
Set the message length at the beginning of the message buffer.
char * CompBuffer() const
Int_t Compress()
Compress the message.
Int_t GetCompressionLevel() const
void SetWhat(UInt_t what)
Using this method one can change the message type a-posteriori In case you OR "what" with kMESS_ACK,...
TSocket * Select()
Return pointer to socket for which an event is waiting.
virtual void Activate(TSocket *sock)
Activate a de-activated socket.
virtual void Add(TSocket *sock, Int_t interest=kRead)
Add socket to the monitor's active list.
virtual void DeActivateAll()
De-activate all activated sockets.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
Int_t GetDescriptor() const
Return socket descriptor.
Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt)
Send a raw buffer of specified length.
TPSocket(TSocket *pSockets[], Int_t size)
Create a parallel socket. This ctor is called by TPServerSocket.
void Close(Option_t *opt="")
Close a parallel socket.
Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt)
Send a raw buffer of specified length.
Int_t Send(const TMessage &mess)
Send a TMessage object.
Int_t Recv(TMessage *&mess)
Receive a TMessage object.
virtual ~TPSocket()
Cleanup the parallel socket.
Int_t GetErrorCode() const
Returns error code.
Option_t * GetOption() const
void Init(Int_t tcpwindowsize, TSocket *sock=0)
Create a parallel socket to the specified host.
TInetAddress GetLocalInetAddress()
Return internet address of local host to which the socket is bound.
virtual Int_t GetLocalPort()
Get port # to which server socket is bound. In case of error returns -1.
virtual TSocket * Accept(UChar_t Opt=0)
Accept a connection on a server socket.
Option_t * GetOption() const
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
Int_t GetErrorCode() const
Returns error code.
UInt_t GetBytesRecv() const
void SendStreamerInfos(const TMessage &mess)
Check if TStreamerInfo must be sent.
const char * GetService() const
Bool_t RecvStreamerInfos(TMessage *mess)
Receive a message containing streamer infos.
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
Int_t GetRemoteProtocol() const
UInt_t GetBytesSent() const
Bool_t Authenticate(const char *user)
Authenticated the socket with specified user.
TInetAddress fLocalAddress
Int_t GetTcpWindowSize() const
virtual void Close(Option_t *opt="")
Close the socket.
Bool_t RecvProcessIDs(TMessage *mess)
Receive a message containing process ids.
void SetUrl(const char *url)
TInetAddress GetInetAddress() const
Int_t GetCompressionLevel() const
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
TSecContext * GetSecContext() const
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.
void SendProcessIDs(const TMessage &mess)
Check if TProcessIDs must be sent.
virtual TInetAddress GetLocalInetAddress()
Return internet address of local host to which the socket is bound.
TSecContext * fSecContext
virtual Int_t GetDescriptor() const
Int_t GetCompressionSettings() const
Int_t GetServType() const
void SetCompressionSettings(Int_t settings=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault)
Used to specify the compression level and algorithm: settings = 100 * algorithm + level.
virtual Bool_t IsValid() const
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
virtual TInetAddress GetSockName(int sock)
Get Internet Protocol (IP) address of host and port #.
virtual void CloseConnection(int sock, Bool_t force=kFALSE)
Close socket connection.
This class represents a WWW compatible URL.