var commandLineParameters = new []
{
"-reliability", "3",
"-reuse-port", "30000"
};
var path = "http://{host}:{port}/";
// set context
SDContext.SetDaemonCertificate("ssl:{host}:{port}", "{PEM encoded cert}");
SDContext.SetUserCertificateWithKey("userCertificate", "password");
// compose message
using(var message = new Message(/*size*/))
{
message.Add(/*...*/);
// open connection
try
{
Environment.SetRVParameters(commandLineParameters);
Environment.Open(path);
}
finally
{
Environment.Close();
}
}
var listener = Listener.New(dispatchableQueue, (closure, messages) => { /*...*/ }, transport, subject, closure);
// ...
listener.Destroy();