company logo

Client :: serverName - Get host name

The function returns the host (server) name, when running in client server mode. When the client is not connected to a server (local mode) the function returns an empty string.

// OSI fragment ...

  if ( serverName.isEmpty )

    Application::output("running a local client");

Return value:  Server name ( odaba::String & )

Valid server name or IP address referring to the server in a client server application.

Implementation details

odaba::String Client  :: serverName (  )

The function returns the server URL or IP number used for starting the server when being connected to a server and an empty string otherwise.