Sockets and the examples

Monkey Forums/Monkey Programming/Sockets and the examples

Xyle(Posted 2014) [#1]
I am currently trying to create a client that will connect to a server and print data to screen from the server.

I used TcpStream and got it working but because its blocking, its not the way I want to go

I have looked at the echoserver_tcp example for quite a long time and just can't wrap my head around it.

I have chopped it up, just using the client portion and got some response from the server, but the client looks to be sending stuff while its receiving and the receiving is printing 1 character, then it will print the whole line.

Because there are quite a bit of methods and interfaces, its a bit confusing.

Isn't there just an easy way to read responses from the server and send input to the server? Like TcpStream does?

Thanks for any help!