Set credentials and .Net server options when you connect to the
ESP Server.
Run the NetEspError command to create an error message store for these tasks:
NetEspError error = new NetEspError();
Set a new URI:
NetEspUri uri = new NetEspUri();
uri.set_uri("esp://cepsun64amd.mycompany.com:19011", error);
Create your credentials:
NetEspCredentials creds = new NetEspCredentials(NetEspCredentials.NET_ESP_CREDENTIALS_T.NET_ESP_CREDENTIALS_SERVER_RSA);
creds.set_user("pengg");
creds.set_password("1234");
creds.set_keyfile("..\\test_data\\keys\\client.pem");
Set options:
NetEspServerOptions options = new NetEspServerOptions();
options.set_mode(NetEspServerOptions.NET_ESP_ACCESS_MODE_T.NET_CALLBACK_ACCESS);
server = new NetEspServer(uri, creds, options);
int rc = server.connect(error);