Unable to read from socket
Daly, Connor G.
Connor.Daly at jhuapl.edu
Mon Aug 24 19:00:18 CEST 2020
Quick thanks to Alex for helping me get started a couple weeks ago. I'm trying to port/rewrite a C++ program I wrote to Genode and am running into a networking issue. The program is a server and accepts TCP connections from clients that do not wait for a response. I'm sending my data via a python 3.7 script that works with the Linux native version of the application and is essentially:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Basically, I've been unable to read from my listen sockets. I'm able to bind, listen for connections, accept an incoming connection, and call socket read(), but then it just hangs. I saw something in the 18.08 release notes that made me think LwIP might only support asynchronous mode, so I tried nonblocking sockets. Those no longer hang, but they also don't read any data. Next, I tried using tcp_terminal and modifying the tcp_terminal_echo program to fit my needs. This program also can't read any of the data I send it. It accepts the incoming connection, but never logs that any bytes are read. However, TCP terminal does accept telnet connections like in the example program. I then discovered that my synchronous socket reading would actually work for a telnet connection as well.
Any idea what is going on here? For reference, my run script is essentially the same as tcp_terminal.run. Failing that, does anyone know what I would need to do to modify tcp_terminal/tcp_terminal_echo to make it accept regular tcp socket connections and not just telnet? Thanks so much!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users