59   printf(
"testTSocket: Creating TUDPSocket\n");
 
   62   if (!fSocket || !fSocket->
IsValid()) {
 
   63      Error(
"testTSocket",
"cannot connect to localhost");
 
   67   TString msg = 
"testTSocket: Testing TSocket with UDP";
 
   69   printf(
"%s\n",msg.
Data());
 
   72      Error(
"testTSocket", 
"error sending command to host %s", fServer.GetHost());
 
   76   char msgRaw[1024] = {0};
 
   84      Error(
"testTSocket", 
"error receiving data from host %s", fServer.GetHost());
 
   88   printf(
"Received Message: \n%s\n",msgRaw);
 
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
 
const char * Data() const
 
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
 
virtual Bool_t IsValid() const
 
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
 
virtual Int_t Select(Int_t interest=kRead, Long_t timeout=-1)
Waits for this socket to change status.
 
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.