library: libCore
#include "TPServerSocket.h"

TPServerSocket


class description - source file - inheritance tree (.pdf)

class TPServerSocket : public TServerSocket

Inheritance Chart:
TObject
<-
TNamed
<-
TSocket
<-
TServerSocket
<-
TPServerSocket
    private:
TPServerSocket(const TPServerSocket&) void operator=(const TPServerSocket&) public:
TPServerSocket(Int_t port, Bool_t reuse = kFALSE, Int_t backlog = kDefaultBacklog, Int_t tcpwindowsize = -1) TPServerSocket(const char* service, Bool_t reuse = kFALSE, Int_t backlog = kDefaultBacklog, Int_t tcpwindowsize = -1) virtual ~TPServerSocket() virtual TSocket* Accept(UChar_t Opt = kSrvNoAuth) static TClass* Class() virtual TClass* IsA() const virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
Int_t fTcpWindowSize size of tcp window (for window scaling)

Class Description

                                                                      
 TPServerSocket                                                       
                                                                      
 This class implements parallel server sockets. A parallel server     
 socket waits for requests to come in over the network. It performs   
 some operation based on that request and then possibly returns a     
 full duplex parallel socket to the requester. The actual work is     
 done via the TSystem class (either TUnixSystem or TWinNTSystem).     
                                                                      


TPServerSocket(Int_t port, Bool_t reuse, Int_t backlog, Int_t tcpwindowsize) : TServerSocket(port, reuse, backlog, tcpwindowsize)
 Create a parallel server socket object on a specified port. Set reuse
 to true to force reuse of the server socket (i.e. do not wait for the
 time out to pass). Using backlog one can set the desirable queue length
 for pending connections.
 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).
 Use IsValid() to check the validity of the
 server socket. In case server socket is not valid use GetErrorCode()
 to obtain the specific error value. These values are:
  0 = no error (socket is valid)
 -1 = low level socket() call failed
 -2 = low level bind() call failed
 -3 = low level listen() call failed
 Every valid server socket is added to the TROOT sockets list which
 will make sure that any open sockets are properly closed on
 program termination.

TPServerSocket(const char *service, Bool_t reuse, Int_t backlog, Int_t tcpwindowsize) : TServerSocket(service, reuse, backlog, tcpwindowsize)
 Create a parallel server socket object for a named service. Set reuse
 to true to force reuse of the server socket (i.e. do not wait for the
 time out to pass). Using backlog one can set the desirable queue length
 for pending connections.
 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).
 Use IsValid() to check the validity of the
 server socket. In case server socket is not valid use GetErrorCode()
 to obtain the specific error value. These values are:
  0 = no error (socket is valid)
 -1 = low level socket() call failed
 -2 = low level bind() call failed
 -3 = low level listen() call failed
 Every valid server socket is added to the TROOT sockets list which
 will make sure that any open sockets are properly closed on
 program termination.

TSocket* Accept(UChar_t Opt)
 Accept a connection on a parallel server socket. Returns a full-duplex
 parallel communication TPSocket object. If no pending connections are
 present on the queue and nonblocking mode has not been enabled
 with SetOption(kNoBlock,1) the call blocks until a connection is
 present. The returned socket must be deleted by the user. The socket
 is also added to the TROOT sockets list which will make sure that
 any open sockets are properly closed on program termination.
 In case of error 0 is returned and in case non-blocking I/O is
 enabled and no connections are available -1 is returned.



Inline Functions


                  void ~TPServerSocket()
                  void operator=(const TPServerSocket&)
        TPServerSocket TPServerSocket(const char* service, Bool_t reuse = kFALSE, Int_t backlog = kDefaultBacklog, Int_t tcpwindowsize = -1)
               TClass* Class()
               TClass* IsA() const
                  void ShowMembers(TMemberInspector& insp, char* parent)
                  void Streamer(TBuffer& b)
                  void StreamerNVirtual(TBuffer& b)


Author: Fons Rademakers 19/1/2001
Last update: root/net:$Name: $:$Id: TPServerSocket.cxx,v 1.8 2005/09/04 15:16:12 brun Exp $
Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.