private const string APP_NAME = "Windows-csharp-General-Sample-App";
private const string APP_METADATA = "os:Windows 7 x64, app:Windows CSharp General Sample App, app_ver:1.0.0";
private const string SERVER = "localhost";
private const string ENCODER = "demo-enc";
private const string USERNAME = "Administrator";
private const string PASSWORD = "password";
private const int PORT = 9300;
private const string NEW_PASSWORD = "";
ServerAddresses knowServer = new ServerAddresses(SERVER, PORT, false);
ServerAddresses availableServers = new ServerAddresses();
Server _server = new Server(APP_NAME, APP_METADATA);
ServerListener _serverListener = new ServerListener();
_server.RegisterListener(_serverListener);
{
Console.WriteLine("Connected to the server!");
} else {
Console.WriteLine("Connection failed!");
}
_server.Disconnect();
ConnectionStrategy
The strategy the SDK should use to connect to a cluster of servers.
Definition ConnectionStrategy.h:21
ServerConnectInfo
This contains values representing configuration info for the local server object on connection.
Definition ServerConnectInfo.h:26