I have a serial to ethernet device that transmits and receives data on a TCP port. I have a GPS device connected to the S-to-E device. The GPS is constantly spitting out data in NMEA string format. I need to be able to connect to the port and listen for the data coming in. I have a basic client working, but it slowly lags and eventually is not returning valid data. When I connect directly to the GPS on a serial port, it streams the data real time, but when I connect via TCP, it buffers it. Also, when connected to the serial port, I can call the ReadLine() method, which grabs everything up to the \r\n at the end.

My question is: Is it possible to connect to a TCP stream and read data one line at a time? The line lengths will be variable, so I can't specify a size of the buffer, that I am aware of.

That was kind of a jumbled mess, if you need any other information or have ideas, let me know.

Thanks