deps/PicklingTools170Release/M2k/udpif/udpservice.cc
string UDPService::ThisHostName ()
{
  char hostname[1024];
  if (gethostname(hostname, 1024) < 0) {
    perror("gethostname");
    return string();
  } else
    return string(hostname);
}
//
// Preconditions: 
//
// Postconditions:
//   Returns:  string containing local hostname or NULL string if failed. 
//
// Parameters:
//
// Description:
//
//  Utility routine for inheriting application to get local hostname 
//  programmatically.  Same value as UDPService::Host attribute.
//  Routine is used in UDPService to set value of Host attribute.
//
//  Note: recommend UDPService::GetHost() function for this purpose
//        in inheriting apps.
//
string containing local hostname or NULL string if failed.





Utility routine for inheriting application to get local hostname
programmatically.  Same value as UDPService::Host attribute.
Routine is used in UDPService to set value of Host attribute.

recommend UDPService::GetHost() function for this purpose
in inheriting apps.
string containing local hostname or NULL string if failed . Utility routine for inheriting application to get local hostname programmatically . Same value as UDPService :: Host attribute . Routine is used in UDPService to set value of Host attribute . recommend UDPService :: GetHost () function for this purpose in inheriting apps .
string UDPService::ThisHostName ()
{
  char hostname[1024];
  if (gethostname(hostname, 1024) < 0) {
    perror("gethostname");
    return string();
  } else
    return string(hostname);
}
string UDPService :: ThisHostName ( ) { char hostname [ 1024 ] ; if ( gethostname ( hostname , 1024 ) < 0 ) { perror ( " " ) ; return string ( ) ; } else return string ( hostname ) ; }
Preconditions:
Postconditions:
Returns:  string containing local hostname or NULL string if failed.
Preconditions : Postconditions : Returns : string containing local hostname or NULL string if failed .