public void Send(string message)
{
if (_client == null) {
_client = _clientFactory.Invoke();
_client.Connect(Port, (s) => {});
if (!_client.IsConnected)
return;
}
_client.SendAndWait(message);
if (!_keepClientAlive) {
_client.Disconnect();
_client = null;
}
}