SetConnectionProperty

Establishes the server connection configuration properties, such as host name and length of timeout.

Syntax

ASCII version:
void setConnectionProperty(const char* name, const char* value) 
Unicode version:
void setConnectionProperty(const	UnicodeString name, const UnicodeString	value) 

Parameters

  • Name — the name of the connection property, such as HOST
  • Value — the value for the name of the connection property, such as "www.myhost.com"

Results

The configuration properties for connection to the server are set.

Example

ASCII Version
SmartPointer<Server> server =new Server() 
server->setConnectionProperty(Server::HOST,"localhost"); 
server->setConnectionProperty(Server::PORT, "8080");
Unicode Version

Same as ASCII, or:

SmartPointer<Server> server =new Server() 
UnicodeString host="localhost";// Or input unicode string 
server->setConnectionProperty(Server::HOST, host);