I may have confused socket programming a bit, but should this not work?
srv = TCPServer.open(3333) client = srv.accept data = "" while (tmp = client.recv(10)) data += tmp end
I tried almost any other method of "receiving" data from the TCPSocket client, but they all freeze and never exit the loop (getc, gets, read, etc.). I feel like I'm forgetting something. What am I missing?
source share