Subscribing over TCP, deserializing each recieved JSON line
问题 tcp_connection = tcp_connect('localhost', 20060) // the server will always send responses on one line. tcp_connection.on('line', function (line) { json = json.decode(line) if(json.result == "success") { // etc, etc, etc. } }) tcp_connection.write("/api/subscribe?source={sourceName}&key={key}&show_previous={true|false}") //stream API request Well, this is a pseudocode I got, and I have no idea how to rewrite it in C#. I got something like this: TcpClient connection = new TcpClientWithTimeout