As test echo server use udpserver.c in the same directory. 
To compile it do: 
    clang udpserver.c -o udpserver
  
 
 
 
{
   printf(
"testTSocket: Creating TUDPSocket\n");
 
 
   if (!fSocket || !fSocket->
IsValid()) {
 
      Error(
"testTSocket",
"cannot connect to localhost");
 
      return -1;
   }
 
   TString msg = 
"testTSocket: Testing TSocket with UDP";
 
 
 
      Error(
"testTSocket", 
"error sending command to host %s", fServer.GetHost());
 
      return -1;
   }
 
 
 
 
      Error(
"testTSocket", 
"error receiving data from host %s", fServer.GetHost());
 
      return -1;
   }
 
 
   return 1;
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
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.
- Author
Definition in file testTUDPSocket.C.