ROOT logo
// @(#)root/net:$Id$
// Author: Fons Rademakers   18/12/96

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TSocket                                                              //
//                                                                      //
// This class implements client sockets. A socket is an endpoint for    //
// communication between two machines.                                  //
// The actual work is done via the TSystem class (either TUnixSystem    //
// or TWinNTSystem).                                                    //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "Bytes.h"
#include "Compression.h"
#include "NetErrors.h"
#include "TEnv.h"
#include "TError.h"
#include "TMessage.h"
#include "TPSocket.h"
#include "TPluginManager.h"
#include "TROOT.h"
#include "TString.h"
#include "TSystem.h"
#include "TUrl.h"
#include "TVirtualAuth.h"
#include "TStreamerInfo.h"
#include "TProcessID.h"

ULong64_t TSocket::fgBytesSent = 0;
ULong64_t TSocket::fgBytesRecv = 0;

//
// Client "protocol changes"
//
// This was in TNetFile and TAuthenticate before, but after the introduction
// of TSocket::CreateAuthSocket the common place for all the clients is TSocket,
// so this seems to be the right place for a version number
//
// 7: added support for ReOpen(), kROOTD_BYE and kROOTD_PROTOCOL2
// 8: added support for update being a create (open stat = 2 and not 1)
// 9: added new authentication features (see README.AUTH)
// 10: added support for authenticated socket via TSocket::CreateAuthSocket(...)
// 11: modified SSH protocol + support for server 'no authentication' mode
// 12: add random tags to avoid reply attacks (password+token)
// 13: authentication re-organization; cleanup in PROOF
// 14: support for SSH authentication via SSH tunnel
// 15: cope with fixes in TUrl::GetFile
// 16: add env setup message exchange
// 17: optmized Globus/GSI protocol exchange
//
Int_t TSocket::fgClientProtocol = 17;  // increase when client protocol changes

TVirtualMutex *gSocketAuthMutex = 0;

ClassImp(TSocket)

//______________________________________________________________________________
TSocket::TSocket(TInetAddress addr, const char *service, Int_t tcpwindowsize)
         : TNamed(addr.GetHostName(), service)
{
   // Create a socket. Connect to the named service at address addr.
   // Use tcpwindowsize to specify the size of the receive buffer, it has
   // to be specified here to make sure the window scale option is set (for
   // tcpwindowsize > 65KB and for platforms supporting window scaling).
   // Returns when connection has been accepted by remote side. Use IsValid()
   // to check the validity of the socket. Every socket is added to the TROOT
   // sockets list which will make sure that any open sockets are properly
   // closed on program termination.

   R__ASSERT(gROOT);
   R__ASSERT(gSystem);

   fService = service;
   fSecContext = 0;
   fRemoteProtocol= -1;
   fServType = kSOCKD;
   if (fService.Contains("root"))
      fServType = kROOTD;
   if (fService.Contains("proof"))
      fServType = kPROOFD;
   fAddress = addr;
   fAddress.fPort = gSystem->GetServiceByName(service);
   fBytesSent = 0;
   fBytesRecv = 0;
   fCompress = 0;
   fTcpWindowSize = tcpwindowsize;
   fUUIDs = 0;
   fLastUsageMtx = 0;
   ResetBit(TSocket::kBrokenConn);

   if (fAddress.GetPort() != -1) {
      fSocket = gSystem->OpenConnection(addr.GetHostName(), fAddress.GetPort(),
                                        tcpwindowsize);

      if (fSocket != -1) {
         R__LOCKGUARD2(gROOTMutex);
         gROOT->GetListOfSockets()->Add(this);
      }
   } else
      fSocket = -1;

}

//______________________________________________________________________________
TSocket::TSocket(TInetAddress addr, Int_t port, Int_t tcpwindowsize)
         : TNamed(addr.GetHostName(), "")
{
   // Create a socket. Connect to the specified port # at address addr.
   // Use tcpwindowsize to specify the size of the receive buffer, it has
   // to be specified here to make sure the window scale option is set (for
   // tcpwindowsize > 65KB and for platforms supporting window scaling).
   // Returns when connection has been accepted by remote side. Use IsValid()
   // to check the validity of the socket. Every socket is added to the TROOT
   // sockets list which will make sure that any open sockets are properly
   // closed on program termination.

   R__ASSERT(gROOT);
   R__ASSERT(gSystem);

   fService = gSystem->GetServiceByPort(port);
   fSecContext = 0;
   fRemoteProtocol= -1;
   fServType = kSOCKD;
   if (fService.Contains("root"))
      fServType = kROOTD;
   if (fService.Contains("proof"))
      fServType = kPROOFD;
   fAddress = addr;
   fAddress.fPort = port;
   SetTitle(fService);
   fBytesSent = 0;
   fBytesRecv = 0;
   fCompress = 0;
   fTcpWindowSize = tcpwindowsize;
   fUUIDs = 0;
   fLastUsageMtx = 0;
   ResetBit(TSocket::kBrokenConn);

   fSocket = gSystem->OpenConnection(addr.GetHostName(), fAddress.GetPort(),
                                     tcpwindowsize);
   if (fSocket == -1)
      fAddress.fPort = -1;
   else {
      R__LOCKGUARD2(gROOTMutex);
      gROOT->GetListOfSockets()->Add(this);
   }
}

//______________________________________________________________________________
TSocket::TSocket(const char *host, const char *service, Int_t tcpwindowsize)
         : TNamed(host, service)
{
   // Create a socket. Connect to named service on the remote host.
   // Use tcpwindowsize to specify the size of the receive buffer, it has
   // to be specified here to make sure the window scale option is set (for
   // tcpwindowsize > 65KB and for platforms supporting window scaling).
   // Returns when connection has been accepted by remote side. Use IsValid()
   // to check the validity of the socket. Every socket is added to the TROOT
   // sockets list which will make sure that any open sockets are properly
   // closed on program termination.

   R__ASSERT(gROOT);
   R__ASSERT(gSystem);

   fService = service;
   fSecContext = 0;
   fRemoteProtocol= -1;
   fServType = kSOCKD;
   if (fService.Contains("root"))
      fServType = kROOTD;
   if (fService.Contains("proof"))
      fServType = kPROOFD;
   fAddress = gSystem->GetHostByName(host);
   fAddress.fPort = gSystem->GetServiceByName(service);
   SetName(fAddress.GetHostName());
   fBytesSent = 0;
   fBytesRecv = 0;
   fCompress = 0;
   fTcpWindowSize = tcpwindowsize;
   fUUIDs = 0;
   fLastUsageMtx = 0;
   ResetBit(TSocket::kBrokenConn);

   if (fAddress.GetPort() != -1) {
      fSocket = gSystem->OpenConnection(host, fAddress.GetPort(), tcpwindowsize);
      if (fSocket != -1) {
         R__LOCKGUARD2(gROOTMutex);
         gROOT->GetListOfSockets()->Add(this);
      }
   } else
      fSocket = -1;
}

//______________________________________________________________________________
TSocket::TSocket(const char *url, Int_t port, Int_t tcpwindowsize)
         : TNamed(TUrl(url).GetHost(), "")
{
   // Create a socket; see CreateAuthSocket for the form of url.
   // Connect to the specified port # on the remote host.
   // If user is specified in url, try authentication as user.
   // Use tcpwindowsize to specify the size of the receive buffer, it has
   // to be specified here to make sure the window scale option is set (for
   // tcpwindowsize > 65KB and for platforms supporting window scaling).
   // Returns when connection has been accepted by remote side. Use IsValid()
   // to check the validity of the socket. Every socket is added to the TROOT
   // sockets list which will make sure that any open sockets are properly
   // closed on program termination.

   R__ASSERT(gROOT);
   R__ASSERT(gSystem);

   fUrl = TString(url);
   TString host(TUrl(fUrl).GetHost());

   fService = gSystem->GetServiceByPort(port);
   fSecContext = 0;
   fRemoteProtocol= -1;
   fServType = kSOCKD;
   if (fUrl.Contains("root"))
      fServType = kROOTD;
   if (fUrl.Contains("proof"))
      fServType = kPROOFD;
   fAddress = gSystem->GetHostByName(host);
   fAddress.fPort = port;
   SetName(fAddress.GetHostName());
   SetTitle(fService);
   fBytesSent = 0;
   fBytesRecv = 0;
   fCompress = 0;
   fTcpWindowSize = tcpwindowsize;
   fUUIDs = 0;
   fLastUsageMtx = 0;
   ResetBit(TSocket::kBrokenConn);

   fSocket = gSystem->OpenConnection(host, fAddress.GetPort(), tcpwindowsize);
   if (fSocket == -1) {
      fAddress.fPort = -1;
   } else {
      R__LOCKGUARD2(gROOTMutex);
      gROOT->GetListOfSockets()->Add(this);
   }
}

//______________________________________________________________________________
TSocket::TSocket(const char *sockpath) : TNamed(sockpath, "")
{
   // Create a socket in the Unix domain on 'sockpath'.
   // Returns when connection has been accepted by the server. Use IsValid()
   // to check the validity of the socket. Every socket is added to the TROOT
   // sockets list which will make sure that any open sockets are properly
   // closed on program termination.

   R__ASSERT(gROOT);
   R__ASSERT(gSystem);

   fUrl = sockpath;

   fService = "unix";
   fSecContext = 0;
   fRemoteProtocol= -1;
   fServType = kSOCKD;
   fAddress.fPort = -1;
   fName.Form("unix:%s", sockpath);
   SetTitle(fService);
   fBytesSent = 0;
   fBytesRecv = 0;
   fCompress  = 0;
   fTcpWindowSize = -1;
   fUUIDs = 0;
   fLastUsageMtx  = 0;
   ResetBit(TSocket::kBrokenConn);

   fSocket = gSystem->OpenConnection(sockpath, -1, -1);
   if (fSocket > 0) {
      R__LOCKGUARD2(gROOTMutex);
      gROOT->GetListOfSockets()->Add(this);
   }
}

//______________________________________________________________________________
TSocket::TSocket(Int_t desc) : TNamed("", "")
{
   // Create a socket. The socket will adopt previously opened TCP socket with
   // descriptor desc.

   R__ASSERT(gROOT);
   R__ASSERT(gSystem);

   fSecContext     = 0;
   fRemoteProtocol = 0;
   fService        = (char *)kSOCKD;
   fServType       = kSOCKD;
   fBytesSent      = 0;
   fBytesRecv      = 0;
   fCompress       = 0;
   fTcpWindowSize = -1;
   fUUIDs          = 0;
   fLastUsageMtx   = 0;
   ResetBit(TSocket::kBrokenConn);

   if (desc >= 0) {
      fSocket  = desc;
      fAddress = gSystem->GetPeerName(fSocket);
      R__LOCKGUARD2(gROOTMutex);
      gROOT->GetListOfSockets()->Add(this);
   } else
      fSocket = -1;
}

//______________________________________________________________________________
TSocket::TSocket(Int_t desc, const char *sockpath) : TNamed(sockpath, "")
{
   // Create a socket. The socket will adopt previously opened Unix socket with
   // descriptor desc. The sockpath arg is for info purposes only. Use
   // this method to adopt e.g. a socket created via socketpair().

   R__ASSERT(gROOT);
   R__ASSERT(gSystem);

   fUrl = sockpath;

   fService = "unix";
   fSecContext = 0;
   fRemoteProtocol= -1;
   fServType = kSOCKD;
   fAddress.fPort = -1;
   fName.Form("unix:%s", sockpath);
   SetTitle(fService);
   fBytesSent = 0;
   fBytesRecv = 0;
   fCompress  = 0;
   fTcpWindowSize = -1;
   fUUIDs = 0;
   fLastUsageMtx  = 0;
   ResetBit(TSocket::kBrokenConn);

   if (desc >= 0) {
      fSocket  = desc;
      R__LOCKGUARD2(gROOTMutex);
      gROOT->GetListOfSockets()->Add(this);
   } else
      fSocket = -1;
}


//______________________________________________________________________________
TSocket::TSocket(const TSocket &s) : TNamed(s)
{
   // TSocket copy ctor.

   fSocket         = s.fSocket;
   fService        = s.fService;
   fAddress        = s.fAddress;
   fLocalAddress   = s.fLocalAddress;
   fBytesSent      = s.fBytesSent;
   fBytesRecv      = s.fBytesRecv;
   fCompress       = s.fCompress;
   fSecContext     = s.fSecContext;
   fRemoteProtocol = s.fRemoteProtocol;
   fServType       = s.fServType;
   fTcpWindowSize  = s.fTcpWindowSize;
   fUUIDs          = 0;
   fLastUsageMtx   = 0;
   ResetBit(TSocket::kBrokenConn);

   if (fSocket != -1) {
      R__LOCKGUARD2(gROOTMutex);
      gROOT->GetListOfSockets()->Add(this);
   }
}

//______________________________________________________________________________
void TSocket::Close(Option_t *option)
{
   // Close the socket. If option is "force", calls shutdown(id,2) to
   // shut down the connection. This will close the connection also
   // for the parent of this process. Also called via the dtor (without
   // option "force", call explicitly Close("force") if this is desired).

   Bool_t force = option ? (!strcmp(option, "force") ? kTRUE : kFALSE) : kFALSE;

   if (fSocket != -1) {
      gSystem->CloseConnection(fSocket, force);
      R__LOCKGUARD2(gROOTMutex);
      gROOT->GetListOfSockets()->Remove(this);
   }
   fSocket = -1;

   SafeDelete(fUUIDs);
   SafeDelete(fLastUsageMtx);
}

//______________________________________________________________________________
TInetAddress TSocket::GetLocalInetAddress()
{
   // Return internet address of local host to which the socket is bound.
   // In case of error TInetAddress::IsValid() returns kFALSE.

   if (IsValid()) {
      if (fLocalAddress.GetPort() == -1)
         fLocalAddress = gSystem->GetSockName(fSocket);
      return fLocalAddress;
   }
   return TInetAddress();
}

//______________________________________________________________________________
Int_t TSocket::GetLocalPort()
{
   // Return the local port # to which the socket is bound.
   // In case of error return -1.

   if (IsValid()) {
      if (fLocalAddress.GetPort() == -1)
         GetLocalInetAddress();
      return fLocalAddress.GetPort();
   }
   return -1;
}

//______________________________________________________________________________
Int_t TSocket::Select(Int_t interest, Long_t timeout)
{
   // Waits for this socket to change status. If interest=kRead,
   // the socket will be watched to see if characters become available for
   // reading; if interest=kWrite the socket will be watched to
   // see if a write will not block.
   // The argument 'timeout' specifies a maximum time to wait in millisec.
   // Default no timeout.
   // Returns 1 if a change of status of interest has been detected within
   // timeout; 0 in case of timeout; < 0 if an error occured.

   Int_t rc = 1;

   // Associate a TFileHandler to this socket
   TFileHandler fh(fSocket, interest);

   // Wait for an event now
   rc = gSystem->Select(&fh, timeout);

   return rc;
}

//______________________________________________________________________________
Int_t TSocket::Send(Int_t kind)
{
   // Send a single message opcode. Use kind (opcode) to set the
   // TMessage "what" field. Returns the number of bytes that were sent
   // (always sizeof(Int_t)) and -1 in case of error. In case the kind has
   // been or'ed with kMESS_ACK, the call will only return after having
   // received an acknowledgement, making the sending process synchronous.

   TMessage mess(kind);

   Int_t nsent;
   if ((nsent = Send(mess)) < 0)
      return -1;

   return nsent;
}

//______________________________________________________________________________
Int_t TSocket::Send(Int_t status, Int_t kind)
{
   // Send a status and a single message opcode. Use kind (opcode) to set the
   // TMessage "what" field. Returns the number of bytes that were sent
   // (always 2*sizeof(Int_t)) and -1 in case of error. In case the kind has
   // been or'ed with kMESS_ACK, the call will only return after having
   // received an acknowledgement, making the sending process synchronous.

   TMessage mess(kind);
   mess << status;

   Int_t nsent;
   if ((nsent = Send(mess)) < 0)
      return -1;

   return nsent;
}

//______________________________________________________________________________
Int_t TSocket::Send(const char *str, Int_t kind)
{
   // Send a character string buffer. Use kind to set the TMessage "what" field.
   // Returns the number of bytes in the string str that were sent and -1 in
   // case of error. In case the kind has been or'ed with kMESS_ACK, the call
   // will only return after having received an acknowledgement, making the
   // sending process synchronous.

   TMessage mess(kind);
   if (str) mess.WriteString(str);

   Int_t nsent;
   if ((nsent = Send(mess)) < 0)
      return -1;

   return nsent - sizeof(Int_t);    // - TMessage::What()
}

//______________________________________________________________________________
Int_t TSocket::Send(const TMessage &mess)
{
   // Send a TMessage object. Returns the number of bytes in the TMessage
   // that were sent and -1 in case of error. In case the TMessage::What
   // has been or'ed with kMESS_ACK, the call will only return after having
   // received an acknowledgement, making the sending process synchronous.
   // Returns -4 in case of kNoBlock and errno == EWOULDBLOCK.
   // Returns -5 if pipe broken or reset by peer (EPIPE || ECONNRESET).
   // support for streaming TStreamerInfo added by Rene Brun May 2008
   // support for streaming TProcessID added by Rene Brun June 2008

   TSystem::ResetErrno();

   if (fSocket == -1) return -1;

   if (mess.IsReading()) {
      Error("Send", "cannot send a message used for reading");
      return -1;
   }

   // send streamer infos in case schema evolution is enabled in the TMessage
   SendStreamerInfos(mess);

   // send the process id's so TRefs work
   SendProcessIDs(mess);

   mess.SetLength();   //write length in first word of buffer

   if (GetCompressionLevel() > 0 && mess.GetCompressionLevel() == 0)
      const_cast<TMessage&>(mess).SetCompressionSettings(fCompress);

   if (mess.GetCompressionLevel() > 0)
      const_cast<TMessage&>(mess).Compress();

   char *mbuf = mess.Buffer();
   Int_t mlen = mess.Length();
   if (mess.CompBuffer()) {
      mbuf = mess.CompBuffer();
      mlen = mess.CompLength();
   }

   ResetBit(TSocket::kBrokenConn);
   Int_t nsent;
   if ((nsent = gSystem->SendRaw(fSocket, mbuf, mlen, 0)) <= 0) {
      if (nsent == -5) {
         // Connection reset by peer or broken
         SetBit(TSocket::kBrokenConn);
         Close();
      }
      return nsent;
   }

   fBytesSent  += nsent;
   fgBytesSent += nsent;

   // If acknowledgement is desired, wait for it
   if (mess.What() & kMESS_ACK) {
      TSystem::ResetErrno();
      ResetBit(TSocket::kBrokenConn);
      char buf[2];
      Int_t n = 0;
      if ((n = gSystem->RecvRaw(fSocket, buf, sizeof(buf), 0)) < 0) {
         if (n == -5) {
            // Connection reset by peer or broken
            SetBit(TSocket::kBrokenConn);
            Close();
         } else
            n = -1;
         return n;
      }
      if (strncmp(buf, "ok", 2)) {
         Error("Send", "bad acknowledgement");
         return -1;
      }
      fBytesRecv  += 2;
      fgBytesRecv += 2;
   }

   Touch();  // update usage timestamp

   return nsent - sizeof(UInt_t);  //length - length header
}

//______________________________________________________________________________
Int_t TSocket::SendObject(const TObject *obj, Int_t kind)
{
   // Send an object. Returns the number of bytes sent and -1 in case of error.
   // In case the "kind" has been or'ed with kMESS_ACK, the call will only
   // return after having received an acknowledgement, making the sending
   // synchronous.

   //stream object to message buffer
   TMessage mess(kind);
   mess.WriteObject(obj);

   //now sending the object itself
   Int_t nsent;
   if ((nsent = Send(mess)) < 0)
      return -1;

   return nsent;
}

//______________________________________________________________________________
Int_t TSocket::SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt)
{
   // Send a raw buffer of specified length. Using option kOob one can send
   // OOB data. Returns the number of bytes sent or -1 in case of error.
   // Returns -4 in case of kNoBlock and errno == EWOULDBLOCK.
   // Returns -5 if pipe broken or reset by peer (EPIPE || ECONNRESET).

   TSystem::ResetErrno();

   if (fSocket == -1) return -1;

   ResetBit(TSocket::kBrokenConn);
   Int_t nsent;
   if ((nsent = gSystem->SendRaw(fSocket, buffer, length, (int) opt)) <= 0) {
      if (nsent == -5) {
         // Connection reset or broken: close
         SetBit(TSocket::kBrokenConn);
         Close();
      }
      return nsent;
   }

   fBytesSent  += nsent;
   fgBytesSent += nsent;

   Touch();  // update usage timestamp

   return nsent;
}

//______________________________________________________________________________
void TSocket::SendStreamerInfos(const TMessage &mess)
{
   // Check if TStreamerInfo must be sent. The list of TStreamerInfo of classes
   // in the object in the message is in the fInfos list of the message.
   // We send only the TStreamerInfos not yet sent on this socket.

   if (mess.fInfos && mess.fInfos->GetEntries()) {
      TIter next(mess.fInfos);
      TStreamerInfo *info;
      TList *minilist = 0;
      while ((info = (TStreamerInfo*)next())) {
         Int_t uid = info->GetNumber();
         if (fBitsInfo.TestBitNumber(uid))
            continue; //TStreamerInfo had already been sent
         fBitsInfo.SetBitNumber(uid);
         if (!minilist)
            minilist = new TList();
         if (gDebug > 0)
            Info("SendStreamerInfos", "sending TStreamerInfo: %s, version = %d",
                 info->GetName(),info->GetClassVersion());
         minilist->Add(info);
      }
      if (minilist) {
         TMessage messinfo(kMESS_STREAMERINFO);
         messinfo.WriteObject(minilist);
         delete minilist;
         if (messinfo.fInfos)
            messinfo.fInfos->Clear();
         if (Send(messinfo) < 0)
            Warning("SendStreamerInfos", "problems sending TStreamerInfo's ...");
      }
   }
}

//______________________________________________________________________________
void TSocket::SendProcessIDs(const TMessage &mess)
{
   // Check if TProcessIDs must be sent. The list of TProcessIDs
   // in the object in the message is found by looking in the TMessage bits.
   // We send only the TProcessIDs not yet send on this socket.

   if (mess.TestBitNumber(0)) {
      TObjArray *pids = TProcessID::GetPIDs();
      Int_t npids = pids->GetEntries();
      TProcessID *pid;
      TList *minilist = 0;
      for (Int_t ipid = 0; ipid < npids; ipid++) {
         pid = (TProcessID*)pids->At(ipid);
         if (!pid || !mess.TestBitNumber(pid->GetUniqueID()+1))
            continue;
         //check if a pid with this title has already been sent through the socket
         //if not add it to the fUUIDs list
         if (!fUUIDs) {
            fUUIDs = new TList();
         } else {
            if (fUUIDs->FindObject(pid->GetTitle()))
               continue;
         }
         fUUIDs->Add(new TObjString(pid->GetTitle()));
         if (!minilist)
            minilist = new TList();
         if (gDebug > 0)
            Info("SendProcessIDs", "sending TProcessID: %s", pid->GetTitle());
         minilist->Add(pid);
      }
      if (minilist) {
         TMessage messpid(kMESS_PROCESSID);
         messpid.WriteObject(minilist);
         delete minilist;
         if (Send(messpid) < 0)
            Warning("SendProcessIDs", "problems sending TProcessID's ...");
      }
   }
}

//______________________________________________________________________________
Int_t TSocket::Recv(char *str, Int_t max)
{
   // Receive a character string message of maximum max length. The expected
   // message must be of type kMESS_STRING. Returns length of received string
   // (can be 0 if otherside of connection is closed) or -1 in case of error
   // or -4 in case a non-blocking socket would block (i.e. there is nothing
   // to be read).

   Int_t n, kind;

   ResetBit(TSocket::kBrokenConn);
   if ((n = Recv(str, max, kind)) <= 0) {
      if (n == -5) {
         SetBit(TSocket::kBrokenConn);
         n = -1;
      }
      return n;
   }

   if (kind != kMESS_STRING) {
      Error("Recv", "got message of wrong kind (expected %d, got %d)",
            kMESS_STRING, kind);
      return -1;
   }

   return n;
}

//______________________________________________________________________________
Int_t TSocket::Recv(char *str, Int_t max, Int_t &kind)
{
   // Receive a character string message of maximum max length. Returns in
   // kind the message type. Returns length of received string+4 (can be 0 if
   // other side of connection is closed) or -1 in case of error or -4 in
   // case a non-blocking socket would block (i.e. there is nothing to be read).

   Int_t     n;
   TMessage *mess;

   ResetBit(TSocket::kBrokenConn);
   if ((n = Recv(mess)) <= 0) {
      if (n == -5) {
         SetBit(TSocket::kBrokenConn);
         n = -1;
      }
      return n;
   }

   kind = mess->What();
   if (str) {
      if (mess->BufferSize() > (Int_t)sizeof(Int_t)) // if mess contains more than kind
         mess->ReadString(str, max);
      else
         str[0] = 0;
   }

   delete mess;

   return n;   // number of bytes read (len of str + sizeof(kind)
}

//______________________________________________________________________________
Int_t TSocket::Recv(Int_t &status, Int_t &kind)
{
   // Receives a status and a message type. Returns length of received
   // integers, 2*sizeof(Int_t) (can be 0 if other side of connection
   // is closed) or -1 in case of error or -4 in case a non-blocking
   // socket would block (i.e. there is nothing to be read).

   Int_t     n;
   TMessage *mess;

   ResetBit(TSocket::kBrokenConn);
   if ((n = Recv(mess)) <= 0) {
      if (n == -5) {
         SetBit(TSocket::kBrokenConn);
         n = -1;
      }
      return n;
   }

   kind = mess->What();
   (*mess) >> status;

   delete mess;

   return n;   // number of bytes read (2 * sizeof(Int_t)
}

//______________________________________________________________________________
Int_t TSocket::Recv(TMessage *&mess)
{
   // Receive a TMessage object. The user must delete the TMessage object.
   // Returns length of message in bytes (can be 0 if other side of connection
   // is closed) or -1 in case of error or -4 in case a non-blocking socket
   // would block (i.e. there is nothing to be read) or -5 if pipe broken
   // or reset by peer (EPIPE || ECONNRESET). In those case mess == 0.

   TSystem::ResetErrno();

   if (fSocket == -1) {
      mess = 0;
      return -1;
   }

oncemore:
   ResetBit(TSocket::kBrokenConn);
   Int_t  n;
   UInt_t len;
   if ((n = gSystem->RecvRaw(fSocket, &len, sizeof(UInt_t), 0)) <= 0) {
      if (n == 0 || n == -5) {
         // Connection closed, reset or broken
         SetBit(TSocket::kBrokenConn);
         Close();
      }
      mess = 0;
      return n;
   }
   len = net2host(len);  //from network to host byte order

   ResetBit(TSocket::kBrokenConn);
   char *buf = new char[len+sizeof(UInt_t)];
   if ((n = gSystem->RecvRaw(fSocket, buf+sizeof(UInt_t), len, 0)) <= 0) {
      if (n == 0 || n == -5) {
         // Connection closed, reset or broken
         SetBit(TSocket::kBrokenConn);
         Close();
      }
      delete [] buf;
      mess = 0;
      return n;
   }

   fBytesRecv  += n + sizeof(UInt_t);
   fgBytesRecv += n + sizeof(UInt_t);

   mess = new TMessage(buf, len+sizeof(UInt_t));

   // receive any streamer infos
   if (RecvStreamerInfos(mess))
      goto oncemore;

   // receive any process ids
   if (RecvProcessIDs(mess))
      goto oncemore;

   if (mess->What() & kMESS_ACK) {
      ResetBit(TSocket::kBrokenConn);
      char ok[2] = { 'o', 'k' };
      Int_t n2 = 0;
      if ((n2 = gSystem->SendRaw(fSocket, ok, sizeof(ok), 0)) < 0) {
         if (n2 == -5) {
            // Connection reset or broken
            SetBit(TSocket::kBrokenConn);
            Close();
         }
         delete mess;
         mess = 0;
         return n2;
      }
      mess->SetWhat(mess->What() & ~kMESS_ACK);

      fBytesSent  += 2;
      fgBytesSent += 2;
   }

   Touch();  // update usage timestamp

   return n;
}

//______________________________________________________________________________
Int_t TSocket::RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt)
{
   // Receive a raw buffer of specified length bytes. Using option kPeek
   // one can peek at incoming data. Returns number of received bytes.
   // Returns -1 in case of error. In case of opt == kOob: -2 means
   // EWOULDBLOCK and -3 EINVAL. In case of non-blocking mode (kNoBlock)
   // -4 means EWOULDBLOCK. Returns -5 if pipe broken or reset by
   // peer (EPIPE || ECONNRESET).

   TSystem::ResetErrno();

   if (fSocket == -1) return -1;
   if (length == 0) return 0;

   ResetBit(TSocket::kBrokenConn);
   Int_t n;
   if ((n = gSystem->RecvRaw(fSocket, buffer, length, (int) opt)) <= 0) {
      if (n == 0 || n == -5) {
         // Connection closed, reset or broken
         SetBit(TSocket::kBrokenConn);
         Close();
      }
      return n;
   }

   fBytesRecv  += n;
   fgBytesRecv += n;

   Touch();  // update usage timestamp

   return n;
}

//______________________________________________________________________________
Bool_t TSocket::RecvStreamerInfos(TMessage *mess)
{
   // Receive a message containing streamer infos. In case the message contains
   // streamer infos they are imported, the message will be deleted and the
   // method returns kTRUE.

   if (mess->What() == kMESS_STREAMERINFO) {
      TList *list = (TList*)mess->ReadObject(TList::Class());
      TIter next(list);
      TStreamerInfo *info;
      TObjLink *lnk = list->FirstLink();
      // First call BuildCheck for regular class
      while (lnk) {
         info = (TStreamerInfo*)lnk->GetObject();
         TObject *element = info->GetElements()->UncheckedAt(0);
         Bool_t isstl = element && strcmp("This",element->GetName())==0;
         if (!isstl) {
            info->BuildCheck();
            if (gDebug > 0)
               Info("RecvStreamerInfos", "importing TStreamerInfo: %s, version = %d",
                    info->GetName(), info->GetClassVersion());
         }
         lnk = lnk->Next();
      }
      // Then call BuildCheck for stl class
      lnk = list->FirstLink();
      while (lnk) {
         info = (TStreamerInfo*)lnk->GetObject();
         TObject *element = info->GetElements()->UncheckedAt(0);
         Bool_t isstl = element && strcmp("This",element->GetName())==0;
         if (isstl) {
            info->BuildCheck();
            if (gDebug > 0)
               Info("RecvStreamerInfos", "importing TStreamerInfo: %s, version = %d",
                    info->GetName(), info->GetClassVersion());
         }
         lnk = lnk->Next();
     }
      delete list;
      delete mess;

      return kTRUE;
   }
   return kFALSE;
}

//______________________________________________________________________________
Bool_t TSocket::RecvProcessIDs(TMessage *mess)
{
   // Receive a message containing process ids. In case the message contains
   // process ids they are imported, the message will be deleted and the
   // method returns kTRUE.

   if (mess->What() == kMESS_PROCESSID) {
      TList *list = (TList*)mess->ReadObject(TList::Class());
      TIter next(list);
      TProcessID *pid;
      while ((pid = (TProcessID*)next())) {
         // check that a similar pid is not already registered in fgPIDs
         TObjArray *pidslist = TProcessID::GetPIDs();
         TIter nextpid(pidslist);
         TProcessID *p;
         while ((p = (TProcessID*)nextpid())) {
            if (!strcmp(p->GetTitle(), pid->GetTitle())) {
               delete pid;
               pid = 0;
               break;
            }
         }
         if (pid) {
            if (gDebug > 0)
               Info("RecvProcessIDs", "importing TProcessID: %s", pid->GetTitle());
            pid->IncrementCount();
            pidslist->Add(pid);
            Int_t ind = pidslist->IndexOf(pid);
            pid->SetUniqueID((UInt_t)ind);
         }
      }
      delete list;
      delete mess;

      return kTRUE;
   }
   return kFALSE;
}

//______________________________________________________________________________
Int_t TSocket::SetOption(ESockOptions opt, Int_t val)
{
   // Set socket options.

   if (fSocket == -1) return -1;

   return gSystem->SetSockOpt(fSocket, opt, val);
}

//______________________________________________________________________________
Int_t TSocket::GetOption(ESockOptions opt, Int_t &val)
{
   // Get socket options. Returns -1 in case of error.

   if (fSocket == -1) return -1;

   return gSystem->GetSockOpt(fSocket, opt, &val);
}

//______________________________________________________________________________
Int_t TSocket::GetErrorCode() const
{
   // Returns error code. Meaning depends on context where it is called.
   // If no error condition returns 0 else a value < 0.
   // For example see TServerSocket ctor.

   if (!IsValid())
      return fSocket;

   return 0;
}

//______________________________________________________________________________
void TSocket::SetCompressionAlgorithm(Int_t algorithm)
{
   // See comments for function SetCompressionSettings
   if (algorithm < 0 || algorithm >= ROOT::kUndefinedCompressionAlgorithm) algorithm = 0;
   if (fCompress < 0) {
      // if the level is not defined yet use 1 as a default
      fCompress = 100 * algorithm + 1;
   } else {
      int level = fCompress % 100;
      fCompress = 100 * algorithm + level;
   }
}

//______________________________________________________________________________
void TSocket::SetCompressionLevel(Int_t level)
{
   // See comments for function SetCompressionSettings
   if (level < 0) level = 0;
   if (level > 99) level = 99;
   if (fCompress < 0) {
      // if the algorithm is not defined yet use 0 as a default
      fCompress = level;
   } else {
      int algorithm = fCompress / 100;
      if (algorithm >= ROOT::kUndefinedCompressionAlgorithm) algorithm = 0;
      fCompress = 100 * algorithm + level;
   }
}

//______________________________________________________________________________
void TSocket::SetCompressionSettings(Int_t settings)
{
   // Used to specify the compression level and algorithm:
   //  settings = 100 * algorithm + level
   //
   //  level = 0, objects written to this file will not be compressed.
   //  level = 1, minimal compression level but fast.
   //  ....
   //  level = 9, maximal compression level but slower and might use more memory.
   // (For the currently supported algorithms, the maximum level is 9)
   // If compress is negative it indicates the compression level is not set yet.
   //
   // The enumeration ROOT::ECompressionAlgorithm associates each
   // algorithm with a number. There is a utility function to help
   // to set the value of the argument. For example,
   //   ROOT::CompressionSettings(ROOT::kLZMA, 1)
   // will build an integer which will set the compression to use
   // the LZMA algorithm and compression level 1.  These are defined
   // in the header file Compression.h.
   //
   // Note that the compression settings may be changed at any time.
   // The new compression settings will only apply to branches created
   // or attached after the setting is changed and other objects written
   // after the setting is changed.
   fCompress = settings;
}

//______________________________________________________________________________
Bool_t TSocket::Authenticate(const char *user)
{
   // Authenticated the socket with specified user.

   Bool_t rc = kFALSE;

   // Parse protocol name, for PROOF, send message with server role
   TString sproto = TUrl(fUrl).GetProtocol();
   if (sproto.Contains("sockd")) {
      fServType = kSOCKD;
   } else if (sproto.Contains("rootd")) {
      fServType = kROOTD;
   } else if (sproto.Contains("proofd")) {
      fServType = kPROOFD;
      // Parse options
      TString opt(TUrl(fUrl).GetOptions());
      //First letter in Opt describes type of proofserv to invoke
      if (!strncasecmp(opt, "S", 1)) {
         if (Send("slave") < 0) return rc;
      } else if (!strncasecmp(opt, "M", 1)) {
         if (Send("master") < 0) return rc;
      } else {
         Warning("Authenticate",
                 "called by TSlave: unknown option '%c' %s",
                 opt[0], " - assuming Slave");
         if (Send("slave") < 0) return rc;
      }
   }
   if (gDebug > 2)
      Info("Authenticate","Local protocol: %s",sproto.Data());

   // Get server protocol level
   Int_t kind = kROOTD_PROTOCOL;
   // Warning: for backward compatibility reasons here we have to
   // send exactly 4 bytes: for fgClientClientProtocol > 99
   // the space in the format must be dropped
   if (fRemoteProtocol == -1) {
      if (Send(Form(" %d", fgClientProtocol), kROOTD_PROTOCOL) < 0) {
         return rc;
      }
      if (Recv(fRemoteProtocol, kind) < 0) {
         return rc;
      }
      //
      // If we are talking to an old rootd server we get a fatal
      // error here and we need to reopen the connection,
      // communicating first the size of the parallel socket
      if (kind == kROOTD_ERR) {
         fRemoteProtocol = 9;
         return kFALSE;
      }
   }

   // Find out whether authentication is required
   Bool_t runauth = kTRUE;
   if (fRemoteProtocol > 1000) {
      // Authentication not required by the remote server
      runauth = kFALSE;
      fRemoteProtocol %= 1000;
   }

   // If authentication is required, we need to find out which library
   // has to be loaded (preparation for near future, 9/7/05)
   TString host = GetInetAddress().GetHostName();
   if (runauth) {

      // Default (future)
      TString alib = "Xrd";
      if (fRemoteProtocol < 100) {
         // Standard Authentication lib
         alib = "Root";
      }

      // Load the plugin
      TPluginHandler *h =
         gROOT->GetPluginManager()->FindHandler("TVirtualAuth", alib);
      if (!h || h->LoadPlugin() != 0) {
         Error("Authenticate",
               "could not load properly %s authentication plugin", alib.Data());
         return rc;
      }

      // Get an instance of the interface class
      TVirtualAuth *auth = (TVirtualAuth *)(h->ExecPlugin(0));
      if (!auth) {
         Error("Authenticate", "could not instantiate the interface class");
         return rc;
      }
      if (gDebug > 1)
         Info("Authenticate", "class for '%s' authentication loaded", alib.Data());

      Option_t *opts = (gROOT->IsProofServ()) ? "P" : "";
      if (!(auth->Authenticate(this, host, user, opts))) {
         Error("Authenticate",
               "authentication attempt failed for %s@%s", user, host.Data());
      } else {
         rc = kTRUE;
      }
   } else {

      // Communicate who we are and our target user
      UserGroup_t *u = gSystem->GetUserInfo();
      if (u) {
         if (Send(Form("%s %s", u->fUser.Data(), user), kROOTD_USER) < 0)
            Warning("Authenticate", "problem sending kROOTD_USER (%s,%s)", u->fUser.Data(), user);
         delete u;
      } else
         if (Send(Form("-1 %s", user), kROOTD_USER) < 0)
            Warning("Authenticate", "problem sending kROOTD_USER (-1,%s)", user);

      rc = kFALSE;

      // Receive confirmation that everything went well
      Int_t stat;
      if (Recv(stat, kind) > 0) {

         if (kind == kROOTD_ERR) {
            if (gDebug > 0)
               TSocket::NetError("TSocket::Authenticate", stat);
         } else if (kind == kROOTD_AUTH) {

            // Authentication was not required: create inactive
            // security context for consistency
            fSecContext = new TSecContext(user, host, 0, -4, 0, 0);
            if (gDebug > 3)
               Info("Authenticate", "no authentication required remotely");

            // Set return flag;
            rc = 1;
         } else {
            if (gDebug > 0)
               Info("Authenticate", "expected message type %d, received %d",
                    kROOTD_AUTH, kind);
         }
      } else {
         if (gDebug > 0)
            Info("Authenticate", "error receiving message");
      }

   }

   return rc;
}

//______________________________________________________________________________
TSocket *TSocket::CreateAuthSocket(const char *url, Int_t size, Int_t tcpwindowsize,
                                   TSocket *opensock, Int_t *err)
{
   // Creates a socket or a parallel socket and authenticates to the
   // remote server.
   //
   // url: [[proto][p][auth]://][user@]host[:port][/service][?options]
   //
   // where  proto = "sockd", "rootd", "proofd"
   //                indicates the type of remote server;
   //                if missing "sockd" is assumed ("sockd" indicates
   //                any remote server session using TServerSocket)
   //          [p] = for parallel sockets (forced internally for
   //                rootd; ignored for proofd)
   //       [auth] = "up", "s", "k", "g", "h", "ug" to force UsrPwd,
   //                SRP, Krb5, Globus, SSH or UidGid authentication
   //       [port] = is the remote port number
   //    [service] = service name used to determine the port
   //                (for backward compatibility, specification of
   //                 port as priority)
   //     options  = "m" or "s", when proto=proofd indicates whether
   //                we are master or slave (used internally by
   //                TSlave)
   //
   // An already opened connection can be used by passing its socket
   // in opensock.
   //
   // If 'err' is defined, '*err' on return from a failed call contains an error
   // code (see NetErrors.h).
   //
   // Example:
   //
   //   TSocket::CreateAuthSocket("rootds://qwerty@machine.fq.dn:5051")
   //
   //   creates an authenticated socket to a rootd server running
   //   on remote machine machine.fq.dn on port 5051; "parallel" sockets
   //   are forced internally because rootd expects
   //   parallel sockets; however a simple socket will be created
   //   in this case because the size is 0 (the default);
   //   authentication will attempt protocol SRP first.
   //
   //   TSocket::CreateAuthSocket("pk://qwerty@machine.fq.dn:5052",3)
   //
   //   creates an authenticated parallel socket of size 3 to a sockd
   //   server running on remote machine machine.fq.dn on port 5052;
   //   authentication will attempt protocol Kerberos first.
   //
   // NB: may hang if the remote server is not of the correct type;
   //     at present TSocket has no way to find out the type of the
   //     remote server automatically
   //
   // Returns pointer to an authenticated socket or 0 if creation or
   // authentication is unsuccessful.

   R__LOCKGUARD2(gSocketAuthMutex);

   // Url to be passed to chosen constructor
   TString eurl(url);

   // Parse protocol, if any
   Bool_t parallel = kFALSE;
   TString proto(TUrl(url).GetProtocol());
   TString protosave = proto;

   // Get rid of authentication suffix
   TString asfx = "";
   if (proto.EndsWith("up") || proto.EndsWith("ug")) {
      asfx = proto;
      asfx.Remove(0,proto.Length()-2);
      proto.Resize(proto.Length()-2);
   } else if (proto.EndsWith("s") || proto.EndsWith("k") ||
              proto.EndsWith("g") || proto.EndsWith("h")) {
      asfx = proto;
      asfx.Remove(0,proto.Length()-1);
      proto.Resize(proto.Length()-1);
   }

   // Find out if parallel (ignore if proofd, force if rootd)
   if (((proto.EndsWith("p") || size > 1) &&
               !proto.BeginsWith("proof")) ||
         proto.BeginsWith("root") ) {
      parallel = kTRUE;
      if (proto.EndsWith("p"))
         proto.Resize(proto.Length()-1);
   }

   // Force "sockd" if the rest is not recognized
   if (!proto.BeginsWith("sock") && !proto.BeginsWith("proof") &&
       !proto.BeginsWith("root"))
      proto = "sockd";

   // Substitute this for original proto in eurl
   protosave += "://";
   proto += asfx;
   proto += "://";
   eurl.ReplaceAll(protosave,proto);

   // Create the socket now

   TSocket *sock = 0;
   if (!parallel) {

      // Simple socket
      if (opensock && opensock->IsValid())
         sock = opensock;
      else
         sock = new TSocket(eurl, TUrl(url).GetPort(), tcpwindowsize);

      // Authenticate now
      if (sock && sock->IsValid()) {
         if (!sock->Authenticate(TUrl(url).GetUser())) {
            // Nothing to do except setting the error code (if required) and sock to NULL
            if (err) {
               *err = (Int_t)kErrAuthNotOK;
               if (sock->TestBit(TSocket::kBrokenConn)) *err = (Int_t)kErrConnectionRefused;
            }
            sock->Close();
            delete sock;
            sock = 0;
         }
      }

   } else {

      // Tell TPSocket that we want authentication, which has to
      // be done using the original socket before creation of set
      // of parallel sockets
      if (eurl.Contains("?"))
         eurl.Resize(eurl.Index("?"));
      eurl += "?A";

      // Parallel socket
      if (opensock && opensock->IsValid())
         sock = new TPSocket(eurl, TUrl(url).GetPort(), size, opensock);
      else
         sock = new TPSocket(eurl, TUrl(url).GetPort(), size, tcpwindowsize);

      // Cleanup if failure ...
      if (sock && !sock->IsAuthenticated()) {
         // Nothing to do except setting the error code (if required) and sock to NULL
         if (err) {
            *err = (Int_t)kErrAuthNotOK;
            if (sock->TestBit(TSocket::kBrokenConn)) *err = (Int_t)kErrConnectionRefused;
         }
         if (sock->IsValid())
            // And except when the sock is valid; this typically
            // happens when talking to a old server, because the
            // the parallel socket system is open before authentication
            delete sock;
         sock = 0;
      }
   }

   return sock;
}

//______________________________________________________________________________
TSocket *TSocket::CreateAuthSocket(const char *user, const char *url,
                                   Int_t port, Int_t size, Int_t tcpwindowsize,
                                   TSocket *opensock, Int_t *err)
{
   // Creates a socket or a parallel socket and authenticates to the
   // remote server specified in 'url' on remote 'port' as 'user'.
   //
   // url: [[proto][p][auth]://]host[/?options]
   //
   // where  proto = "sockd", "rootd", "proofd"
   //                indicates the type of remote server
   //                if missing "sockd" is assumed ("sockd" indicates
   //                any remote server session using TServerSocket)
   //          [p] = for parallel sockets (forced internally for
   //                rootd)
   //       [auth] = "up", "s", "k", "g", "h", "ug" to force UsrPwd,
   //                SRP, Krb5, Globus, SSH or UidGid authentication
   //    [options] = "m" or "s", when proto=proofd indicates whether
   //                we are master or slave (used internally by TSlave)
   //
   // An already opened connection can be used by passing its socket
   // in opensock.
   //
   // If 'err' is defined, '*err' on return from a failed call contains an error
   // code (see NetErrors.h).
   //
   // Example:
   //
   //   TSocket::CreateAuthSocket("qwerty","rootdps://machine.fq.dn",5051)
   //
   //   creates an authenticated socket to a rootd server running
   //   on remote machine machine.fq.dn on port 5051; "parallel"
   //   sockets are forced internally because rootd expects
   //   parallel sockets; however a simple socket will be created
   //   in this case because the size is 0 (the default);
   //   authentication will attempt protocol SRP first.
   //
   //   TSocket::CreateAuthSocket("qwerty","pk://machine.fq.dn:5052",3)
   //
   //   creates an authenticated parallel socket of size 3 to a sockd
   //   server running on remote machine machine.fq.dn on port 5052;
   //   authentication will attempt protocol Kerberos first.
   //
   // NB: may hang if the remote server is not of the correct type;
   //     at present TSocket has no way to find out the type of the
   //     remote server automatically
   //
   // Returns pointer to an authenticated socket or 0 if creation or
   // authentication is unsuccessful.

   R__LOCKGUARD2(gSocketAuthMutex);

   // Extended url to be passed to base call
   TString eurl;

   // Add protocol, if any
   if (TString(TUrl(url).GetProtocol()).Length() > 0) {
      eurl += TString(TUrl(url).GetProtocol());
      eurl += TString("://");
   }
   // Add user, if any
   if (!user || strlen(user) > 0) {
      eurl += TString(user);
      eurl += TString("@");
   }
   // Add host
   eurl += TString(TUrl(url).GetHost());
   // Add port
   eurl += TString(":");
   eurl += (port > 0 ? port : 0);
   // Add options, if any
   if (TString(TUrl(url).GetOptions()).Length() > 0) {
      eurl += TString("/?");
      eurl += TString(TUrl(url).GetOptions());
   }

   // Create the socket and return it
   return TSocket::CreateAuthSocket(eurl,size,tcpwindowsize,opensock,err);
}

//______________________________________________________________________________
Int_t TSocket::GetClientProtocol()
{
   // Static method returning supported client protocol.

   return fgClientProtocol;
}

//______________________________________________________________________________
void TSocket::NetError(const char *where, Int_t err)
{
   // Print error string depending on error code.

   // Make sure it is in range
   err = (err < kErrError) ? ((err > -1) ? err : 0) : kErrError;

   if (gDebug > 0)
      ::Error(where, "%s", gRootdErrStr[err]);
}

//______________________________________________________________________________
ULong64_t TSocket::GetSocketBytesSent()
{
   // Get total number of bytes sent via all sockets.

   return fgBytesSent;
}

//______________________________________________________________________________
ULong64_t TSocket::GetSocketBytesRecv()
{
   // Get total number of bytes received via all sockets.

   return fgBytesRecv;
}
 TSocket.cxx:1
 TSocket.cxx:2
 TSocket.cxx:3
 TSocket.cxx:4
 TSocket.cxx:5
 TSocket.cxx:6
 TSocket.cxx:7
 TSocket.cxx:8
 TSocket.cxx:9
 TSocket.cxx:10
 TSocket.cxx:11
 TSocket.cxx:12
 TSocket.cxx:13
 TSocket.cxx:14
 TSocket.cxx:15
 TSocket.cxx:16
 TSocket.cxx:17
 TSocket.cxx:18
 TSocket.cxx:19
 TSocket.cxx:20
 TSocket.cxx:21
 TSocket.cxx:22
 TSocket.cxx:23
 TSocket.cxx:24
 TSocket.cxx:25
 TSocket.cxx:26
 TSocket.cxx:27
 TSocket.cxx:28
 TSocket.cxx:29
 TSocket.cxx:30
 TSocket.cxx:31
 TSocket.cxx:32
 TSocket.cxx:33
 TSocket.cxx:34
 TSocket.cxx:35
 TSocket.cxx:36
 TSocket.cxx:37
 TSocket.cxx:38
 TSocket.cxx:39
 TSocket.cxx:40
 TSocket.cxx:41
 TSocket.cxx:42
 TSocket.cxx:43
 TSocket.cxx:44
 TSocket.cxx:45
 TSocket.cxx:46
 TSocket.cxx:47
 TSocket.cxx:48
 TSocket.cxx:49
 TSocket.cxx:50
 TSocket.cxx:51
 TSocket.cxx:52
 TSocket.cxx:53
 TSocket.cxx:54
 TSocket.cxx:55
 TSocket.cxx:56
 TSocket.cxx:57
 TSocket.cxx:58
 TSocket.cxx:59
 TSocket.cxx:60
 TSocket.cxx:61
 TSocket.cxx:62
 TSocket.cxx:63
 TSocket.cxx:64
 TSocket.cxx:65
 TSocket.cxx:66
 TSocket.cxx:67
 TSocket.cxx:68
 TSocket.cxx:69
 TSocket.cxx:70
 TSocket.cxx:71
 TSocket.cxx:72
 TSocket.cxx:73
 TSocket.cxx:74
 TSocket.cxx:75
 TSocket.cxx:76
 TSocket.cxx:77
 TSocket.cxx:78
 TSocket.cxx:79
 TSocket.cxx:80
 TSocket.cxx:81
 TSocket.cxx:82
 TSocket.cxx:83
 TSocket.cxx:84
 TSocket.cxx:85
 TSocket.cxx:86
 TSocket.cxx:87
 TSocket.cxx:88
 TSocket.cxx:89
 TSocket.cxx:90
 TSocket.cxx:91
 TSocket.cxx:92
 TSocket.cxx:93
 TSocket.cxx:94
 TSocket.cxx:95
 TSocket.cxx:96
 TSocket.cxx:97
 TSocket.cxx:98
 TSocket.cxx:99
 TSocket.cxx:100
 TSocket.cxx:101
 TSocket.cxx:102
 TSocket.cxx:103
 TSocket.cxx:104
 TSocket.cxx:105
 TSocket.cxx:106
 TSocket.cxx:107
 TSocket.cxx:108
 TSocket.cxx:109
 TSocket.cxx:110
 TSocket.cxx:111
 TSocket.cxx:112
 TSocket.cxx:113
 TSocket.cxx:114
 TSocket.cxx:115
 TSocket.cxx:116
 TSocket.cxx:117
 TSocket.cxx:118
 TSocket.cxx:119
 TSocket.cxx:120
 TSocket.cxx:121
 TSocket.cxx:122
 TSocket.cxx:123
 TSocket.cxx:124
 TSocket.cxx:125
 TSocket.cxx:126
 TSocket.cxx:127
 TSocket.cxx:128
 TSocket.cxx:129
 TSocket.cxx:130
 TSocket.cxx:131
 TSocket.cxx:132
 TSocket.cxx:133
 TSocket.cxx:134
 TSocket.cxx:135
 TSocket.cxx:136
 TSocket.cxx:137
 TSocket.cxx:138
 TSocket.cxx:139
 TSocket.cxx:140
 TSocket.cxx:141
 TSocket.cxx:142
 TSocket.cxx:143
 TSocket.cxx:144
 TSocket.cxx:145
 TSocket.cxx:146
 TSocket.cxx:147
 TSocket.cxx:148
 TSocket.cxx:149
 TSocket.cxx:150
 TSocket.cxx:151
 TSocket.cxx:152
 TSocket.cxx:153
 TSocket.cxx:154
 TSocket.cxx:155
 TSocket.cxx:156
 TSocket.cxx:157
 TSocket.cxx:158
 TSocket.cxx:159
 TSocket.cxx:160
 TSocket.cxx:161
 TSocket.cxx:162
 TSocket.cxx:163
 TSocket.cxx:164
 TSocket.cxx:165
 TSocket.cxx:166
 TSocket.cxx:167
 TSocket.cxx:168
 TSocket.cxx:169
 TSocket.cxx:170
 TSocket.cxx:171
 TSocket.cxx:172
 TSocket.cxx:173
 TSocket.cxx:174
 TSocket.cxx:175
 TSocket.cxx:176
 TSocket.cxx:177
 TSocket.cxx:178
 TSocket.cxx:179
 TSocket.cxx:180
 TSocket.cxx:181
 TSocket.cxx:182
 TSocket.cxx:183
 TSocket.cxx:184
 TSocket.cxx:185
 TSocket.cxx:186
 TSocket.cxx:187
 TSocket.cxx:188
 TSocket.cxx:189
 TSocket.cxx:190
 TSocket.cxx:191
 TSocket.cxx:192
 TSocket.cxx:193
 TSocket.cxx:194
 TSocket.cxx:195
 TSocket.cxx:196
 TSocket.cxx:197
 TSocket.cxx:198
 TSocket.cxx:199
 TSocket.cxx:200
 TSocket.cxx:201
 TSocket.cxx:202
 TSocket.cxx:203
 TSocket.cxx:204
 TSocket.cxx:205
 TSocket.cxx:206
 TSocket.cxx:207
 TSocket.cxx:208
 TSocket.cxx:209
 TSocket.cxx:210
 TSocket.cxx:211
 TSocket.cxx:212
 TSocket.cxx:213
 TSocket.cxx:214
 TSocket.cxx:215
 TSocket.cxx:216
 TSocket.cxx:217
 TSocket.cxx:218
 TSocket.cxx:219
 TSocket.cxx:220
 TSocket.cxx:221
 TSocket.cxx:222
 TSocket.cxx:223
 TSocket.cxx:224
 TSocket.cxx:225
 TSocket.cxx:226
 TSocket.cxx:227
 TSocket.cxx:228
 TSocket.cxx:229
 TSocket.cxx:230
 TSocket.cxx:231
 TSocket.cxx:232
 TSocket.cxx:233
 TSocket.cxx:234
 TSocket.cxx:235
 TSocket.cxx:236
 TSocket.cxx:237
 TSocket.cxx:238
 TSocket.cxx:239
 TSocket.cxx:240
 TSocket.cxx:241
 TSocket.cxx:242
 TSocket.cxx:243
 TSocket.cxx:244
 TSocket.cxx:245
 TSocket.cxx:246
 TSocket.cxx:247
 TSocket.cxx:248
 TSocket.cxx:249
 TSocket.cxx:250
 TSocket.cxx:251
 TSocket.cxx:252
 TSocket.cxx:253
 TSocket.cxx:254
 TSocket.cxx:255
 TSocket.cxx:256
 TSocket.cxx:257
 TSocket.cxx:258
 TSocket.cxx:259
 TSocket.cxx:260
 TSocket.cxx:261
 TSocket.cxx:262
 TSocket.cxx:263
 TSocket.cxx:264
 TSocket.cxx:265
 TSocket.cxx:266
 TSocket.cxx:267
 TSocket.cxx:268
 TSocket.cxx:269
 TSocket.cxx:270
 TSocket.cxx:271
 TSocket.cxx:272
 TSocket.cxx:273
 TSocket.cxx:274
 TSocket.cxx:275
 TSocket.cxx:276
 TSocket.cxx:277
 TSocket.cxx:278
 TSocket.cxx:279
 TSocket.cxx:280
 TSocket.cxx:281
 TSocket.cxx:282
 TSocket.cxx:283
 TSocket.cxx:284
 TSocket.cxx:285
 TSocket.cxx:286
 TSocket.cxx:287
 TSocket.cxx:288
 TSocket.cxx:289
 TSocket.cxx:290
 TSocket.cxx:291
 TSocket.cxx:292
 TSocket.cxx:293
 TSocket.cxx:294
 TSocket.cxx:295
 TSocket.cxx:296
 TSocket.cxx:297
 TSocket.cxx:298
 TSocket.cxx:299
 TSocket.cxx:300
 TSocket.cxx:301
 TSocket.cxx:302
 TSocket.cxx:303
 TSocket.cxx:304
 TSocket.cxx:305
 TSocket.cxx:306
 TSocket.cxx:307
 TSocket.cxx:308
 TSocket.cxx:309
 TSocket.cxx:310
 TSocket.cxx:311
 TSocket.cxx:312
 TSocket.cxx:313
 TSocket.cxx:314
 TSocket.cxx:315
 TSocket.cxx:316
 TSocket.cxx:317
 TSocket.cxx:318
 TSocket.cxx:319
 TSocket.cxx:320
 TSocket.cxx:321
 TSocket.cxx:322
 TSocket.cxx:323
 TSocket.cxx:324
 TSocket.cxx:325
 TSocket.cxx:326
 TSocket.cxx:327
 TSocket.cxx:328
 TSocket.cxx:329
 TSocket.cxx:330
 TSocket.cxx:331
 TSocket.cxx:332
 TSocket.cxx:333
 TSocket.cxx:334
 TSocket.cxx:335
 TSocket.cxx:336
 TSocket.cxx:337
 TSocket.cxx:338
 TSocket.cxx:339
 TSocket.cxx:340
 TSocket.cxx:341
 TSocket.cxx:342
 TSocket.cxx:343
 TSocket.cxx:344
 TSocket.cxx:345
 TSocket.cxx:346
 TSocket.cxx:347
 TSocket.cxx:348
 TSocket.cxx:349
 TSocket.cxx:350
 TSocket.cxx:351
 TSocket.cxx:352
 TSocket.cxx:353
 TSocket.cxx:354
 TSocket.cxx:355
 TSocket.cxx:356
 TSocket.cxx:357
 TSocket.cxx:358
 TSocket.cxx:359
 TSocket.cxx:360
 TSocket.cxx:361
 TSocket.cxx:362
 TSocket.cxx:363
 TSocket.cxx:364
 TSocket.cxx:365
 TSocket.cxx:366
 TSocket.cxx:367
 TSocket.cxx:368
 TSocket.cxx:369
 TSocket.cxx:370
 TSocket.cxx:371
 TSocket.cxx:372
 TSocket.cxx:373
 TSocket.cxx:374
 TSocket.cxx:375
 TSocket.cxx:376
 TSocket.cxx:377
 TSocket.cxx:378
 TSocket.cxx:379
 TSocket.cxx:380
 TSocket.cxx:381
 TSocket.cxx:382
 TSocket.cxx:383
 TSocket.cxx:384
 TSocket.cxx:385
 TSocket.cxx:386
 TSocket.cxx:387
 TSocket.cxx:388
 TSocket.cxx:389
 TSocket.cxx:390
 TSocket.cxx:391
 TSocket.cxx:392
 TSocket.cxx:393
 TSocket.cxx:394
 TSocket.cxx:395
 TSocket.cxx:396
 TSocket.cxx:397
 TSocket.cxx:398
 TSocket.cxx:399
 TSocket.cxx:400
 TSocket.cxx:401
 TSocket.cxx:402
 TSocket.cxx:403
 TSocket.cxx:404
 TSocket.cxx:405
 TSocket.cxx:406
 TSocket.cxx:407
 TSocket.cxx:408
 TSocket.cxx:409
 TSocket.cxx:410
 TSocket.cxx:411
 TSocket.cxx:412
 TSocket.cxx:413
 TSocket.cxx:414
 TSocket.cxx:415
 TSocket.cxx:416
 TSocket.cxx:417
 TSocket.cxx:418
 TSocket.cxx:419
 TSocket.cxx:420
 TSocket.cxx:421
 TSocket.cxx:422
 TSocket.cxx:423
 TSocket.cxx:424
 TSocket.cxx:425
 TSocket.cxx:426
 TSocket.cxx:427
 TSocket.cxx:428
 TSocket.cxx:429
 TSocket.cxx:430
 TSocket.cxx:431
 TSocket.cxx:432
 TSocket.cxx:433
 TSocket.cxx:434
 TSocket.cxx:435
 TSocket.cxx:436
 TSocket.cxx:437
 TSocket.cxx:438
 TSocket.cxx:439
 TSocket.cxx:440
 TSocket.cxx:441
 TSocket.cxx:442
 TSocket.cxx:443
 TSocket.cxx:444
 TSocket.cxx:445
 TSocket.cxx:446
 TSocket.cxx:447
 TSocket.cxx:448
 TSocket.cxx:449
 TSocket.cxx:450
 TSocket.cxx:451
 TSocket.cxx:452
 TSocket.cxx:453
 TSocket.cxx:454
 TSocket.cxx:455
 TSocket.cxx:456
 TSocket.cxx:457
 TSocket.cxx:458
 TSocket.cxx:459
 TSocket.cxx:460
 TSocket.cxx:461
 TSocket.cxx:462
 TSocket.cxx:463
 TSocket.cxx:464
 TSocket.cxx:465
 TSocket.cxx:466
 TSocket.cxx:467
 TSocket.cxx:468
 TSocket.cxx:469
 TSocket.cxx:470
 TSocket.cxx:471
 TSocket.cxx:472
 TSocket.cxx:473
 TSocket.cxx:474
 TSocket.cxx:475
 TSocket.cxx:476
 TSocket.cxx:477
 TSocket.cxx:478
 TSocket.cxx:479
 TSocket.cxx:480
 TSocket.cxx:481
 TSocket.cxx:482
 TSocket.cxx:483
 TSocket.cxx:484
 TSocket.cxx:485
 TSocket.cxx:486
 TSocket.cxx:487
 TSocket.cxx:488
 TSocket.cxx:489
 TSocket.cxx:490
 TSocket.cxx:491
 TSocket.cxx:492
 TSocket.cxx:493
 TSocket.cxx:494
 TSocket.cxx:495
 TSocket.cxx:496
 TSocket.cxx:497
 TSocket.cxx:498
 TSocket.cxx:499
 TSocket.cxx:500
 TSocket.cxx:501
 TSocket.cxx:502
 TSocket.cxx:503
 TSocket.cxx:504
 TSocket.cxx:505
 TSocket.cxx:506
 TSocket.cxx:507
 TSocket.cxx:508
 TSocket.cxx:509
 TSocket.cxx:510
 TSocket.cxx:511
 TSocket.cxx:512
 TSocket.cxx:513
 TSocket.cxx:514
 TSocket.cxx:515
 TSocket.cxx:516
 TSocket.cxx:517
 TSocket.cxx:518
 TSocket.cxx:519
 TSocket.cxx:520
 TSocket.cxx:521
 TSocket.cxx:522
 TSocket.cxx:523
 TSocket.cxx:524
 TSocket.cxx:525
 TSocket.cxx:526
 TSocket.cxx:527
 TSocket.cxx:528
 TSocket.cxx:529
 TSocket.cxx:530
 TSocket.cxx:531
 TSocket.cxx:532
 TSocket.cxx:533
 TSocket.cxx:534
 TSocket.cxx:535
 TSocket.cxx:536
 TSocket.cxx:537
 TSocket.cxx:538
 TSocket.cxx:539
 TSocket.cxx:540
 TSocket.cxx:541
 TSocket.cxx:542
 TSocket.cxx:543
 TSocket.cxx:544
 TSocket.cxx:545
 TSocket.cxx:546
 TSocket.cxx:547
 TSocket.cxx:548
 TSocket.cxx:549
 TSocket.cxx:550
 TSocket.cxx:551
 TSocket.cxx:552
 TSocket.cxx:553
 TSocket.cxx:554
 TSocket.cxx:555
 TSocket.cxx:556
 TSocket.cxx:557
 TSocket.cxx:558
 TSocket.cxx:559
 TSocket.cxx:560
 TSocket.cxx:561
 TSocket.cxx:562
 TSocket.cxx:563
 TSocket.cxx:564
 TSocket.cxx:565
 TSocket.cxx:566
 TSocket.cxx:567
 TSocket.cxx:568
 TSocket.cxx:569
 TSocket.cxx:570
 TSocket.cxx:571
 TSocket.cxx:572
 TSocket.cxx:573
 TSocket.cxx:574
 TSocket.cxx:575
 TSocket.cxx:576
 TSocket.cxx:577
 TSocket.cxx:578
 TSocket.cxx:579
 TSocket.cxx:580
 TSocket.cxx:581
 TSocket.cxx:582
 TSocket.cxx:583
 TSocket.cxx:584
 TSocket.cxx:585
 TSocket.cxx:586
 TSocket.cxx:587
 TSocket.cxx:588
 TSocket.cxx:589
 TSocket.cxx:590
 TSocket.cxx:591
 TSocket.cxx:592
 TSocket.cxx:593
 TSocket.cxx:594
 TSocket.cxx:595
 TSocket.cxx:596
 TSocket.cxx:597
 TSocket.cxx:598
 TSocket.cxx:599
 TSocket.cxx:600
 TSocket.cxx:601
 TSocket.cxx:602
 TSocket.cxx:603
 TSocket.cxx:604
 TSocket.cxx:605
 TSocket.cxx:606
 TSocket.cxx:607
 TSocket.cxx:608
 TSocket.cxx:609
 TSocket.cxx:610
 TSocket.cxx:611
 TSocket.cxx:612
 TSocket.cxx:613
 TSocket.cxx:614
 TSocket.cxx:615
 TSocket.cxx:616
 TSocket.cxx:617
 TSocket.cxx:618
 TSocket.cxx:619
 TSocket.cxx:620
 TSocket.cxx:621
 TSocket.cxx:622
 TSocket.cxx:623
 TSocket.cxx:624
 TSocket.cxx:625
 TSocket.cxx:626
 TSocket.cxx:627
 TSocket.cxx:628
 TSocket.cxx:629
 TSocket.cxx:630
 TSocket.cxx:631
 TSocket.cxx:632
 TSocket.cxx:633
 TSocket.cxx:634
 TSocket.cxx:635
 TSocket.cxx:636
 TSocket.cxx:637
 TSocket.cxx:638
 TSocket.cxx:639
 TSocket.cxx:640
 TSocket.cxx:641
 TSocket.cxx:642
 TSocket.cxx:643
 TSocket.cxx:644
 TSocket.cxx:645
 TSocket.cxx:646
 TSocket.cxx:647
 TSocket.cxx:648
 TSocket.cxx:649
 TSocket.cxx:650
 TSocket.cxx:651
 TSocket.cxx:652
 TSocket.cxx:653
 TSocket.cxx:654
 TSocket.cxx:655
 TSocket.cxx:656
 TSocket.cxx:657
 TSocket.cxx:658
 TSocket.cxx:659
 TSocket.cxx:660
 TSocket.cxx:661
 TSocket.cxx:662
 TSocket.cxx:663
 TSocket.cxx:664
 TSocket.cxx:665
 TSocket.cxx:666
 TSocket.cxx:667
 TSocket.cxx:668
 TSocket.cxx:669
 TSocket.cxx:670
 TSocket.cxx:671
 TSocket.cxx:672
 TSocket.cxx:673
 TSocket.cxx:674
 TSocket.cxx:675
 TSocket.cxx:676
 TSocket.cxx:677
 TSocket.cxx:678
 TSocket.cxx:679
 TSocket.cxx:680
 TSocket.cxx:681
 TSocket.cxx:682
 TSocket.cxx:683
 TSocket.cxx:684
 TSocket.cxx:685
 TSocket.cxx:686
 TSocket.cxx:687
 TSocket.cxx:688
 TSocket.cxx:689
 TSocket.cxx:690
 TSocket.cxx:691
 TSocket.cxx:692
 TSocket.cxx:693
 TSocket.cxx:694
 TSocket.cxx:695
 TSocket.cxx:696
 TSocket.cxx:697
 TSocket.cxx:698
 TSocket.cxx:699
 TSocket.cxx:700
 TSocket.cxx:701
 TSocket.cxx:702
 TSocket.cxx:703
 TSocket.cxx:704
 TSocket.cxx:705
 TSocket.cxx:706
 TSocket.cxx:707
 TSocket.cxx:708
 TSocket.cxx:709
 TSocket.cxx:710
 TSocket.cxx:711
 TSocket.cxx:712
 TSocket.cxx:713
 TSocket.cxx:714
 TSocket.cxx:715
 TSocket.cxx:716
 TSocket.cxx:717
 TSocket.cxx:718
 TSocket.cxx:719
 TSocket.cxx:720
 TSocket.cxx:721
 TSocket.cxx:722
 TSocket.cxx:723
 TSocket.cxx:724
 TSocket.cxx:725
 TSocket.cxx:726
 TSocket.cxx:727
 TSocket.cxx:728
 TSocket.cxx:729
 TSocket.cxx:730
 TSocket.cxx:731
 TSocket.cxx:732
 TSocket.cxx:733
 TSocket.cxx:734
 TSocket.cxx:735
 TSocket.cxx:736
 TSocket.cxx:737
 TSocket.cxx:738
 TSocket.cxx:739
 TSocket.cxx:740
 TSocket.cxx:741
 TSocket.cxx:742
 TSocket.cxx:743
 TSocket.cxx:744
 TSocket.cxx:745
 TSocket.cxx:746
 TSocket.cxx:747
 TSocket.cxx:748
 TSocket.cxx:749
 TSocket.cxx:750
 TSocket.cxx:751
 TSocket.cxx:752
 TSocket.cxx:753
 TSocket.cxx:754
 TSocket.cxx:755
 TSocket.cxx:756
 TSocket.cxx:757
 TSocket.cxx:758
 TSocket.cxx:759
 TSocket.cxx:760
 TSocket.cxx:761
 TSocket.cxx:762
 TSocket.cxx:763
 TSocket.cxx:764
 TSocket.cxx:765
 TSocket.cxx:766
 TSocket.cxx:767
 TSocket.cxx:768
 TSocket.cxx:769
 TSocket.cxx:770
 TSocket.cxx:771
 TSocket.cxx:772
 TSocket.cxx:773
 TSocket.cxx:774
 TSocket.cxx:775
 TSocket.cxx:776
 TSocket.cxx:777
 TSocket.cxx:778
 TSocket.cxx:779
 TSocket.cxx:780
 TSocket.cxx:781
 TSocket.cxx:782
 TSocket.cxx:783
 TSocket.cxx:784
 TSocket.cxx:785
 TSocket.cxx:786
 TSocket.cxx:787
 TSocket.cxx:788
 TSocket.cxx:789
 TSocket.cxx:790
 TSocket.cxx:791
 TSocket.cxx:792
 TSocket.cxx:793
 TSocket.cxx:794
 TSocket.cxx:795
 TSocket.cxx:796
 TSocket.cxx:797
 TSocket.cxx:798
 TSocket.cxx:799
 TSocket.cxx:800
 TSocket.cxx:801
 TSocket.cxx:802
 TSocket.cxx:803
 TSocket.cxx:804
 TSocket.cxx:805
 TSocket.cxx:806
 TSocket.cxx:807
 TSocket.cxx:808
 TSocket.cxx:809
 TSocket.cxx:810
 TSocket.cxx:811
 TSocket.cxx:812
 TSocket.cxx:813
 TSocket.cxx:814
 TSocket.cxx:815
 TSocket.cxx:816
 TSocket.cxx:817
 TSocket.cxx:818
 TSocket.cxx:819
 TSocket.cxx:820
 TSocket.cxx:821
 TSocket.cxx:822
 TSocket.cxx:823
 TSocket.cxx:824
 TSocket.cxx:825
 TSocket.cxx:826
 TSocket.cxx:827
 TSocket.cxx:828
 TSocket.cxx:829
 TSocket.cxx:830
 TSocket.cxx:831
 TSocket.cxx:832
 TSocket.cxx:833
 TSocket.cxx:834
 TSocket.cxx:835
 TSocket.cxx:836
 TSocket.cxx:837
 TSocket.cxx:838
 TSocket.cxx:839
 TSocket.cxx:840
 TSocket.cxx:841
 TSocket.cxx:842
 TSocket.cxx:843
 TSocket.cxx:844
 TSocket.cxx:845
 TSocket.cxx:846
 TSocket.cxx:847
 TSocket.cxx:848
 TSocket.cxx:849
 TSocket.cxx:850
 TSocket.cxx:851
 TSocket.cxx:852
 TSocket.cxx:853
 TSocket.cxx:854
 TSocket.cxx:855
 TSocket.cxx:856
 TSocket.cxx:857
 TSocket.cxx:858
 TSocket.cxx:859
 TSocket.cxx:860
 TSocket.cxx:861
 TSocket.cxx:862
 TSocket.cxx:863
 TSocket.cxx:864
 TSocket.cxx:865
 TSocket.cxx:866
 TSocket.cxx:867
 TSocket.cxx:868
 TSocket.cxx:869
 TSocket.cxx:870
 TSocket.cxx:871
 TSocket.cxx:872
 TSocket.cxx:873
 TSocket.cxx:874
 TSocket.cxx:875
 TSocket.cxx:876
 TSocket.cxx:877
 TSocket.cxx:878
 TSocket.cxx:879
 TSocket.cxx:880
 TSocket.cxx:881
 TSocket.cxx:882
 TSocket.cxx:883
 TSocket.cxx:884
 TSocket.cxx:885
 TSocket.cxx:886
 TSocket.cxx:887
 TSocket.cxx:888
 TSocket.cxx:889
 TSocket.cxx:890
 TSocket.cxx:891
 TSocket.cxx:892
 TSocket.cxx:893
 TSocket.cxx:894
 TSocket.cxx:895
 TSocket.cxx:896
 TSocket.cxx:897
 TSocket.cxx:898
 TSocket.cxx:899
 TSocket.cxx:900
 TSocket.cxx:901
 TSocket.cxx:902
 TSocket.cxx:903
 TSocket.cxx:904
 TSocket.cxx:905
 TSocket.cxx:906
 TSocket.cxx:907
 TSocket.cxx:908
 TSocket.cxx:909
 TSocket.cxx:910
 TSocket.cxx:911
 TSocket.cxx:912
 TSocket.cxx:913
 TSocket.cxx:914
 TSocket.cxx:915
 TSocket.cxx:916
 TSocket.cxx:917
 TSocket.cxx:918
 TSocket.cxx:919
 TSocket.cxx:920
 TSocket.cxx:921
 TSocket.cxx:922
 TSocket.cxx:923
 TSocket.cxx:924
 TSocket.cxx:925
 TSocket.cxx:926
 TSocket.cxx:927
 TSocket.cxx:928
 TSocket.cxx:929
 TSocket.cxx:930
 TSocket.cxx:931
 TSocket.cxx:932
 TSocket.cxx:933
 TSocket.cxx:934
 TSocket.cxx:935
 TSocket.cxx:936
 TSocket.cxx:937
 TSocket.cxx:938
 TSocket.cxx:939
 TSocket.cxx:940
 TSocket.cxx:941
 TSocket.cxx:942
 TSocket.cxx:943
 TSocket.cxx:944
 TSocket.cxx:945
 TSocket.cxx:946
 TSocket.cxx:947
 TSocket.cxx:948
 TSocket.cxx:949
 TSocket.cxx:950
 TSocket.cxx:951
 TSocket.cxx:952
 TSocket.cxx:953
 TSocket.cxx:954
 TSocket.cxx:955
 TSocket.cxx:956
 TSocket.cxx:957
 TSocket.cxx:958
 TSocket.cxx:959
 TSocket.cxx:960
 TSocket.cxx:961
 TSocket.cxx:962
 TSocket.cxx:963
 TSocket.cxx:964
 TSocket.cxx:965
 TSocket.cxx:966
 TSocket.cxx:967
 TSocket.cxx:968
 TSocket.cxx:969
 TSocket.cxx:970
 TSocket.cxx:971
 TSocket.cxx:972
 TSocket.cxx:973
 TSocket.cxx:974
 TSocket.cxx:975
 TSocket.cxx:976
 TSocket.cxx:977
 TSocket.cxx:978
 TSocket.cxx:979
 TSocket.cxx:980
 TSocket.cxx:981
 TSocket.cxx:982
 TSocket.cxx:983
 TSocket.cxx:984
 TSocket.cxx:985
 TSocket.cxx:986
 TSocket.cxx:987
 TSocket.cxx:988
 TSocket.cxx:989
 TSocket.cxx:990
 TSocket.cxx:991
 TSocket.cxx:992
 TSocket.cxx:993
 TSocket.cxx:994
 TSocket.cxx:995
 TSocket.cxx:996
 TSocket.cxx:997
 TSocket.cxx:998
 TSocket.cxx:999
 TSocket.cxx:1000
 TSocket.cxx:1001
 TSocket.cxx:1002
 TSocket.cxx:1003
 TSocket.cxx:1004
 TSocket.cxx:1005
 TSocket.cxx:1006
 TSocket.cxx:1007
 TSocket.cxx:1008
 TSocket.cxx:1009
 TSocket.cxx:1010
 TSocket.cxx:1011
 TSocket.cxx:1012
 TSocket.cxx:1013
 TSocket.cxx:1014
 TSocket.cxx:1015
 TSocket.cxx:1016
 TSocket.cxx:1017
 TSocket.cxx:1018
 TSocket.cxx:1019
 TSocket.cxx:1020
 TSocket.cxx:1021
 TSocket.cxx:1022
 TSocket.cxx:1023
 TSocket.cxx:1024
 TSocket.cxx:1025
 TSocket.cxx:1026
 TSocket.cxx:1027
 TSocket.cxx:1028
 TSocket.cxx:1029
 TSocket.cxx:1030
 TSocket.cxx:1031
 TSocket.cxx:1032
 TSocket.cxx:1033
 TSocket.cxx:1034
 TSocket.cxx:1035
 TSocket.cxx:1036
 TSocket.cxx:1037
 TSocket.cxx:1038
 TSocket.cxx:1039
 TSocket.cxx:1040
 TSocket.cxx:1041
 TSocket.cxx:1042
 TSocket.cxx:1043
 TSocket.cxx:1044
 TSocket.cxx:1045
 TSocket.cxx:1046
 TSocket.cxx:1047
 TSocket.cxx:1048
 TSocket.cxx:1049
 TSocket.cxx:1050
 TSocket.cxx:1051
 TSocket.cxx:1052
 TSocket.cxx:1053
 TSocket.cxx:1054
 TSocket.cxx:1055
 TSocket.cxx:1056
 TSocket.cxx:1057
 TSocket.cxx:1058
 TSocket.cxx:1059
 TSocket.cxx:1060
 TSocket.cxx:1061
 TSocket.cxx:1062
 TSocket.cxx:1063
 TSocket.cxx:1064
 TSocket.cxx:1065
 TSocket.cxx:1066
 TSocket.cxx:1067
 TSocket.cxx:1068
 TSocket.cxx:1069
 TSocket.cxx:1070
 TSocket.cxx:1071
 TSocket.cxx:1072
 TSocket.cxx:1073
 TSocket.cxx:1074
 TSocket.cxx:1075
 TSocket.cxx:1076
 TSocket.cxx:1077
 TSocket.cxx:1078
 TSocket.cxx:1079
 TSocket.cxx:1080
 TSocket.cxx:1081
 TSocket.cxx:1082
 TSocket.cxx:1083
 TSocket.cxx:1084
 TSocket.cxx:1085
 TSocket.cxx:1086
 TSocket.cxx:1087
 TSocket.cxx:1088
 TSocket.cxx:1089
 TSocket.cxx:1090
 TSocket.cxx:1091
 TSocket.cxx:1092
 TSocket.cxx:1093
 TSocket.cxx:1094
 TSocket.cxx:1095
 TSocket.cxx:1096
 TSocket.cxx:1097
 TSocket.cxx:1098
 TSocket.cxx:1099
 TSocket.cxx:1100
 TSocket.cxx:1101
 TSocket.cxx:1102
 TSocket.cxx:1103
 TSocket.cxx:1104
 TSocket.cxx:1105
 TSocket.cxx:1106
 TSocket.cxx:1107
 TSocket.cxx:1108
 TSocket.cxx:1109
 TSocket.cxx:1110
 TSocket.cxx:1111
 TSocket.cxx:1112
 TSocket.cxx:1113
 TSocket.cxx:1114
 TSocket.cxx:1115
 TSocket.cxx:1116
 TSocket.cxx:1117
 TSocket.cxx:1118
 TSocket.cxx:1119
 TSocket.cxx:1120
 TSocket.cxx:1121
 TSocket.cxx:1122
 TSocket.cxx:1123
 TSocket.cxx:1124
 TSocket.cxx:1125
 TSocket.cxx:1126
 TSocket.cxx:1127
 TSocket.cxx:1128
 TSocket.cxx:1129
 TSocket.cxx:1130
 TSocket.cxx:1131
 TSocket.cxx:1132
 TSocket.cxx:1133
 TSocket.cxx:1134
 TSocket.cxx:1135
 TSocket.cxx:1136
 TSocket.cxx:1137
 TSocket.cxx:1138
 TSocket.cxx:1139
 TSocket.cxx:1140
 TSocket.cxx:1141
 TSocket.cxx:1142
 TSocket.cxx:1143
 TSocket.cxx:1144
 TSocket.cxx:1145
 TSocket.cxx:1146
 TSocket.cxx:1147
 TSocket.cxx:1148
 TSocket.cxx:1149
 TSocket.cxx:1150
 TSocket.cxx:1151
 TSocket.cxx:1152
 TSocket.cxx:1153
 TSocket.cxx:1154
 TSocket.cxx:1155
 TSocket.cxx:1156
 TSocket.cxx:1157
 TSocket.cxx:1158
 TSocket.cxx:1159
 TSocket.cxx:1160
 TSocket.cxx:1161
 TSocket.cxx:1162
 TSocket.cxx:1163
 TSocket.cxx:1164
 TSocket.cxx:1165
 TSocket.cxx:1166
 TSocket.cxx:1167
 TSocket.cxx:1168
 TSocket.cxx:1169
 TSocket.cxx:1170
 TSocket.cxx:1171
 TSocket.cxx:1172
 TSocket.cxx:1173
 TSocket.cxx:1174
 TSocket.cxx:1175
 TSocket.cxx:1176
 TSocket.cxx:1177
 TSocket.cxx:1178
 TSocket.cxx:1179
 TSocket.cxx:1180
 TSocket.cxx:1181
 TSocket.cxx:1182
 TSocket.cxx:1183
 TSocket.cxx:1184
 TSocket.cxx:1185
 TSocket.cxx:1186
 TSocket.cxx:1187
 TSocket.cxx:1188
 TSocket.cxx:1189
 TSocket.cxx:1190
 TSocket.cxx:1191
 TSocket.cxx:1192
 TSocket.cxx:1193
 TSocket.cxx:1194
 TSocket.cxx:1195
 TSocket.cxx:1196
 TSocket.cxx:1197
 TSocket.cxx:1198
 TSocket.cxx:1199
 TSocket.cxx:1200
 TSocket.cxx:1201
 TSocket.cxx:1202
 TSocket.cxx:1203
 TSocket.cxx:1204
 TSocket.cxx:1205
 TSocket.cxx:1206
 TSocket.cxx:1207
 TSocket.cxx:1208
 TSocket.cxx:1209
 TSocket.cxx:1210
 TSocket.cxx:1211
 TSocket.cxx:1212
 TSocket.cxx:1213
 TSocket.cxx:1214
 TSocket.cxx:1215
 TSocket.cxx:1216
 TSocket.cxx:1217
 TSocket.cxx:1218
 TSocket.cxx:1219
 TSocket.cxx:1220
 TSocket.cxx:1221
 TSocket.cxx:1222
 TSocket.cxx:1223
 TSocket.cxx:1224
 TSocket.cxx:1225
 TSocket.cxx:1226
 TSocket.cxx:1227
 TSocket.cxx:1228
 TSocket.cxx:1229
 TSocket.cxx:1230
 TSocket.cxx:1231
 TSocket.cxx:1232
 TSocket.cxx:1233
 TSocket.cxx:1234
 TSocket.cxx:1235
 TSocket.cxx:1236
 TSocket.cxx:1237
 TSocket.cxx:1238
 TSocket.cxx:1239
 TSocket.cxx:1240
 TSocket.cxx:1241
 TSocket.cxx:1242
 TSocket.cxx:1243
 TSocket.cxx:1244
 TSocket.cxx:1245
 TSocket.cxx:1246
 TSocket.cxx:1247
 TSocket.cxx:1248
 TSocket.cxx:1249
 TSocket.cxx:1250
 TSocket.cxx:1251
 TSocket.cxx:1252
 TSocket.cxx:1253
 TSocket.cxx:1254
 TSocket.cxx:1255
 TSocket.cxx:1256
 TSocket.cxx:1257
 TSocket.cxx:1258
 TSocket.cxx:1259
 TSocket.cxx:1260
 TSocket.cxx:1261
 TSocket.cxx:1262
 TSocket.cxx:1263
 TSocket.cxx:1264
 TSocket.cxx:1265
 TSocket.cxx:1266
 TSocket.cxx:1267
 TSocket.cxx:1268
 TSocket.cxx:1269
 TSocket.cxx:1270
 TSocket.cxx:1271
 TSocket.cxx:1272
 TSocket.cxx:1273
 TSocket.cxx:1274
 TSocket.cxx:1275
 TSocket.cxx:1276
 TSocket.cxx:1277
 TSocket.cxx:1278
 TSocket.cxx:1279
 TSocket.cxx:1280
 TSocket.cxx:1281
 TSocket.cxx:1282
 TSocket.cxx:1283
 TSocket.cxx:1284
 TSocket.cxx:1285
 TSocket.cxx:1286
 TSocket.cxx:1287
 TSocket.cxx:1288
 TSocket.cxx:1289
 TSocket.cxx:1290
 TSocket.cxx:1291
 TSocket.cxx:1292
 TSocket.cxx:1293
 TSocket.cxx:1294
 TSocket.cxx:1295
 TSocket.cxx:1296
 TSocket.cxx:1297
 TSocket.cxx:1298
 TSocket.cxx:1299
 TSocket.cxx:1300
 TSocket.cxx:1301
 TSocket.cxx:1302
 TSocket.cxx:1303
 TSocket.cxx:1304
 TSocket.cxx:1305
 TSocket.cxx:1306
 TSocket.cxx:1307
 TSocket.cxx:1308
 TSocket.cxx:1309
 TSocket.cxx:1310
 TSocket.cxx:1311
 TSocket.cxx:1312
 TSocket.cxx:1313
 TSocket.cxx:1314
 TSocket.cxx:1315
 TSocket.cxx:1316
 TSocket.cxx:1317
 TSocket.cxx:1318
 TSocket.cxx:1319
 TSocket.cxx:1320
 TSocket.cxx:1321
 TSocket.cxx:1322
 TSocket.cxx:1323
 TSocket.cxx:1324
 TSocket.cxx:1325
 TSocket.cxx:1326
 TSocket.cxx:1327
 TSocket.cxx:1328
 TSocket.cxx:1329
 TSocket.cxx:1330
 TSocket.cxx:1331
 TSocket.cxx:1332
 TSocket.cxx:1333
 TSocket.cxx:1334
 TSocket.cxx:1335
 TSocket.cxx:1336
 TSocket.cxx:1337
 TSocket.cxx:1338
 TSocket.cxx:1339
 TSocket.cxx:1340
 TSocket.cxx:1341
 TSocket.cxx:1342
 TSocket.cxx:1343
 TSocket.cxx:1344
 TSocket.cxx:1345
 TSocket.cxx:1346
 TSocket.cxx:1347
 TSocket.cxx:1348
 TSocket.cxx:1349
 TSocket.cxx:1350
 TSocket.cxx:1351
 TSocket.cxx:1352
 TSocket.cxx:1353
 TSocket.cxx:1354
 TSocket.cxx:1355
 TSocket.cxx:1356
 TSocket.cxx:1357
 TSocket.cxx:1358
 TSocket.cxx:1359
 TSocket.cxx:1360
 TSocket.cxx:1361
 TSocket.cxx:1362
 TSocket.cxx:1363
 TSocket.cxx:1364
 TSocket.cxx:1365
 TSocket.cxx:1366
 TSocket.cxx:1367
 TSocket.cxx:1368
 TSocket.cxx:1369
 TSocket.cxx:1370
 TSocket.cxx:1371
 TSocket.cxx:1372
 TSocket.cxx:1373
 TSocket.cxx:1374
 TSocket.cxx:1375
 TSocket.cxx:1376
 TSocket.cxx:1377
 TSocket.cxx:1378
 TSocket.cxx:1379
 TSocket.cxx:1380
 TSocket.cxx:1381
 TSocket.cxx:1382
 TSocket.cxx:1383
 TSocket.cxx:1384
 TSocket.cxx:1385
 TSocket.cxx:1386
 TSocket.cxx:1387
 TSocket.cxx:1388
 TSocket.cxx:1389
 TSocket.cxx:1390
 TSocket.cxx:1391
 TSocket.cxx:1392
 TSocket.cxx:1393
 TSocket.cxx:1394
 TSocket.cxx:1395
 TSocket.cxx:1396
 TSocket.cxx:1397
 TSocket.cxx:1398
 TSocket.cxx:1399
 TSocket.cxx:1400
 TSocket.cxx:1401
 TSocket.cxx:1402
 TSocket.cxx:1403
 TSocket.cxx:1404
 TSocket.cxx:1405
 TSocket.cxx:1406
 TSocket.cxx:1407
 TSocket.cxx:1408
 TSocket.cxx:1409
 TSocket.cxx:1410
 TSocket.cxx:1411
 TSocket.cxx:1412
 TSocket.cxx:1413
 TSocket.cxx:1414
 TSocket.cxx:1415
 TSocket.cxx:1416
 TSocket.cxx:1417
 TSocket.cxx:1418
 TSocket.cxx:1419
 TSocket.cxx:1420
 TSocket.cxx:1421
 TSocket.cxx:1422
 TSocket.cxx:1423
 TSocket.cxx:1424
 TSocket.cxx:1425
 TSocket.cxx:1426
 TSocket.cxx:1427
 TSocket.cxx:1428
 TSocket.cxx:1429
 TSocket.cxx:1430
 TSocket.cxx:1431
 TSocket.cxx:1432
 TSocket.cxx:1433
 TSocket.cxx:1434
 TSocket.cxx:1435
 TSocket.cxx:1436
 TSocket.cxx:1437
 TSocket.cxx:1438
 TSocket.cxx:1439
 TSocket.cxx:1440
 TSocket.cxx:1441
 TSocket.cxx:1442
 TSocket.cxx:1443
 TSocket.cxx:1444
 TSocket.cxx:1445
 TSocket.cxx:1446
 TSocket.cxx:1447
 TSocket.cxx:1448
 TSocket.cxx:1449
 TSocket.cxx:1450
 TSocket.cxx:1451
 TSocket.cxx:1452
 TSocket.cxx:1453
 TSocket.cxx:1454
 TSocket.cxx:1455
 TSocket.cxx:1456
 TSocket.cxx:1457
 TSocket.cxx:1458
 TSocket.cxx:1459
 TSocket.cxx:1460
 TSocket.cxx:1461
 TSocket.cxx:1462
 TSocket.cxx:1463
 TSocket.cxx:1464
 TSocket.cxx:1465
 TSocket.cxx:1466
 TSocket.cxx:1467
 TSocket.cxx:1468
 TSocket.cxx:1469
 TSocket.cxx:1470
 TSocket.cxx:1471
 TSocket.cxx:1472
 TSocket.cxx:1473
 TSocket.cxx:1474
 TSocket.cxx:1475
 TSocket.cxx:1476
 TSocket.cxx:1477
 TSocket.cxx:1478
 TSocket.cxx:1479
 TSocket.cxx:1480
 TSocket.cxx:1481
 TSocket.cxx:1482
 TSocket.cxx:1483
 TSocket.cxx:1484
 TSocket.cxx:1485
 TSocket.cxx:1486
 TSocket.cxx:1487
 TSocket.cxx:1488
 TSocket.cxx:1489
 TSocket.cxx:1490
 TSocket.cxx:1491
 TSocket.cxx:1492
 TSocket.cxx:1493
 TSocket.cxx:1494
 TSocket.cxx:1495
 TSocket.cxx:1496
 TSocket.cxx:1497
 TSocket.cxx:1498
 TSocket.cxx:1499
 TSocket.cxx:1500
 TSocket.cxx:1501
 TSocket.cxx:1502
 TSocket.cxx:1503
 TSocket.cxx:1504
 TSocket.cxx:1505
 TSocket.cxx:1506
 TSocket.cxx:1507
 TSocket.cxx:1508
 TSocket.cxx:1509
 TSocket.cxx:1510
 TSocket.cxx:1511
 TSocket.cxx:1512
 TSocket.cxx:1513
 TSocket.cxx:1514
 TSocket.cxx:1515
 TSocket.cxx:1516
 TSocket.cxx:1517
 TSocket.cxx:1518
 TSocket.cxx:1519
 TSocket.cxx:1520
 TSocket.cxx:1521
 TSocket.cxx:1522