I have a socket server that is waiting for input from a connection through hGetLine. This works great when messages are sent with a trailing newline. I would like to grab from the buffer whenever a newline or zero is received - setting the descriptor's buffer mode to NoBuffering does not affect this, hGetLine still hangs until \ n appears. Is there an easy way to post both new and null terminators?
source share