using System; using System.IO; using System.Net; using System.Net.Sockets; using Inspectron.HawkEye.Protocol; using UdtSharp; namespace Inspectron.HawkEye { public class UDTClient { UdtSharp.UdtSocket _client; public UDTClient():this(IPAddress.Loopback, 27001) { } public UDTClient(IPAddress address,int port) { _client = new UdtSharp.UdtSocket(AddressFamily.InterNetwork, SocketType.Stream); _client.Connect(new IPEndPoint(address, port)); } public byte[] RequestImage() { var request = CreateTriggerRequest(); _client.Send(request, 0, request.Length); byte[] buffer = new byte[2048 * 4 * 1000]; int bytes = 0; while (bytes