114 char *pauth = (
char *)strstr(host,
"?A");
130 Int_t tcpw = (
size > 1 ? -1 : tcpwindowsize);
134 gROOT->GetListOfSockets()->Remove(ns);
210 char *pauth = (
char *)strstr(host,
"?A");
230 gROOT->GetListOfSockets()->Remove(ns);
263 gROOT->GetListOfSockets()->Add(
this);
305 gROOT->GetListOfSockets()->Add(
this);
353 gROOT->GetListOfSockets()->Remove(
this);
389 Warning(
"Init",
"%p: problems sending (0,0)", sock);
392 Warning(
"Init",
"problems sending (0,0)");
409 Warning(
"Init",
"%p: problems sending size", sock);
412 Warning(
"Init",
"problems sending size");
497 Error(
"Send",
"cannot send a message used for reading");
515 char *mbuf = mess.
Buffer();
536 if (strncmp(buf,
"ok", 2)) {
537 Error(
"Send",
"bad acknowledgement");
577 for (
i = 0;
i < nsocks;
i++) {
587 for (
int is = 0; is < nsocks; is++) {
649 if (
len > (std::numeric_limits<
decltype(
len)>::max() -
sizeof(
decltype(
len)))) {
650 Error(
"Recv",
"Buffer length is %u and %u+sizeof(UInt_t) cannot be represented as an UInt_t.",
len,
len);
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++) {
UShort_t net2host(UShort_t x)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
externTVirtualMutex * gROOTMutex
char * Compress(const char *str)
Remove all blanks from the string str.
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 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,...
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
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.
This class implements parallel server sockets.
Int_t Send(const TMessage &mess) override
Send a TMessage object.
Int_t Recv(TMessage *&mess) override
Receive a TMessage object.
TPSocket(TSocket *pSockets[], Int_t size)
Create a parallel socket. This ctor is called by TPServerSocket.
void Close(Option_t *opt="") override
Close a parallel socket.
virtual ~TPSocket()
Cleanup the parallel socket.
void Init(Int_t tcpwindowsize, TSocket *sock=nullptr)
Create a parallel socket to the specified host.
Int_t GetErrorCode() const
Returns error code.
Int_t SetOption(ESockOptions opt, Int_t val) override
Set socket options.
TInetAddress GetLocalInetAddress() override
Return internet address of local host to which the socket is bound.
Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault) override
Send a raw buffer of specified length.
Option_t * GetOption() const override
Int_t GetDescriptor() const override
Return socket descriptor.
Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault) override
Send a raw buffer of specified length.
Bool_t IsValid() const override
Int_t GetLocalPort() override
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.
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
friend class TServerSocket
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
Option_t * GetOption() const override
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.
This class represents a WWW compatible URL.