Sebastiaan Visser wrote:
Does anyone know a pattern in which I can do this easily?
Don't use hGetContents on a socket. That's asking for trouble.
Use hGetContents either NEVER (easy option) or only on throwaway
handles/files which won't be used again.
Jules