in sdk/src/Core/Internal/Emitters/UdpSegmentEmitter.cs [69:95]
public void Send(Entity segment)
{
try
{
var packet = _marshaller.Marshall(segment);
var data = Encoding.ASCII.GetBytes(packet);
var ip = EndPoint; //Need local var to ensure ip do not updates
_logger.DebugFormat("UDP Segment emitter endpoint: {0}.", ip);
_udpClient.Send(data, data.Length, ip);
}
catch (SocketException e)
{
_logger.Error(e, "Failed to send package through socket.");
}
catch (ArgumentNullException e)
{
_logger.Error(e, "The udp data gram is null.");
}
catch (ObjectDisposedException e)
{
_logger.Error(e, "The udp client is already closed.");
}
catch (InvalidOperationException e)
{
_logger.Error(e, "The udp client connection is invalid.");
}
}