There are a few problems with the code snippet you sent, but the main one from the GeoEvent input point of view is that the message sent is missing a Message Separator indicator. The default settings for the 'Receive text from a TCP Socket' input connector is a '\n' character: 1. Missing Message Separator. 2. Need to use System.Net.Dns.GetHostEntry() instead of System.Net.IPAddress.Parse() to convert a DNS entry into an IP Address. 3. Need to use escaped quote characters to mark two fields as one with the CSV format. This will allow you to pass a "x,y" or a "x,y,z" geometry value correctly as one CSV field. 4. It is recommended to use UTF8 encoding.Following is the corrected code snippet: // ... using System.Net.Sockets; using System.Net; // ... Socket soc = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); IPHostEntry hostEntry = Dns.GetHostEntry("localhost"); IPAddress ipAdd = hostEntry.AddressList[0]; soc.Connect(ipAdd, 5565); byte[] byData = System.Text.Encoding.UTF8.GetBytes("Vehicle,123,Truck,15,2012-07-24T08:00:00,\"-117.198361,34.055581\"\n"); int bytesSent = soc.Send(byData);-Hanoch
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.