33 class TPSocket :
public TSocket {
35 friend class TPServerSocket;
39 TMonitor *fWriteMonitor;
40 TMonitor *fReadMonitor;
42 Int_t *fWriteBytesLeft;
43 Int_t *fReadBytesLeft;
47 TPSocket(TSocket *pSockets[], Int_t size);
48 TPSocket(
const TPSocket &);
49 void operator=(
const TPSocket &);
50 void Init(Int_t tcpwindowsize, TSocket *sock = 0);
51 Option_t *GetOption()
const {
return TObject::GetOption(); }
54 TPSocket(TInetAddress address,
const char *service, Int_t size,
55 Int_t tcpwindowsize = -1);
56 TPSocket(TInetAddress address, Int_t port, Int_t size,
57 Int_t tcpwindowsize = -1);
58 TPSocket(
const char *host,
const char *service, Int_t size,
59 Int_t tcpwindowsize = -1);
60 TPSocket(
const char *host, Int_t port, Int_t size, Int_t tcpwindowsize = -1);
61 TPSocket(
const char *host, Int_t port, Int_t size, TSocket *sock);
64 void Close(Option_t *opt=
"");
65 Int_t GetDescriptor()
const;
66 TInetAddress GetLocalInetAddress();
68 Int_t Send(
const TMessage &mess);
69 Int_t Send(Int_t kind) {
return TSocket::Send(kind); }
70 Int_t Send(Int_t status, Int_t kind) {
return TSocket::Send(status, kind); }
71 Int_t Send(
const char *mess, Int_t kind = kMESS_STRING) {
return TSocket::Send(mess, kind); }
72 Int_t SendRaw(
const void *buffer, Int_t length, ESendRecvOptions opt);
73 Int_t Recv(TMessage *&mess);
74 Int_t Recv(Int_t &status, Int_t &kind) {
return TSocket::Recv(status, kind); }
75 Int_t Recv(
char *mess, Int_t max) {
return TSocket::Recv(mess, max); }
76 Int_t Recv(
char *mess, Int_t max, Int_t &kind) {
return TSocket::Recv(mess, max, kind); }
77 Int_t RecvRaw(
void *buffer, Int_t length, ESendRecvOptions opt);
79 Bool_t IsValid()
const {
return fSockets ? kTRUE : kFALSE; }
80 Int_t GetErrorCode()
const;
81 Int_t SetOption(ESockOptions opt, Int_t val);
82 Int_t GetOption(ESockOptions opt, Int_t &val);
83 Int_t GetSize()
const {
return fSize; }