Re: [Haskell-cafe] How to design an network client with user program.

2013-04-15 Thread Joey Adams
I've been struggling with a similar situation: a client and server that communicate with binary-encoded messages, sending "heartbeats" (dummy messages) every 30 seconds, and timing out the connection if no response is received in 3 minutes. The client sends data to the server, while also listening

Re: [Haskell-cafe] How to design an network client with user program.

2013-04-10 Thread Alexander V Vershilov
On 10 April 2013 14:56, Michael Snoyman wrote: > It doesn't seem like you're trying to perform multiple actions > simultaneously. For example, you don't need to be able to read from the > server and send data back at the same time. Instead, you'll have a single > thread of execution. Am I right?

Re: [Haskell-cafe] How to design an network client with user program.

2013-04-10 Thread Michael Snoyman
On Wed, Apr 10, 2013 at 2:08 PM, Alexander V Vershilov < alexander.vershi...@gmail.com> wrote: > > On 10 April 2013 14:56, Michael Snoyman wrote: > >> It doesn't seem like you're trying to perform multiple actions >> simultaneously. For example, you don't need to be able to read from the >> serve

Re: [Haskell-cafe] How to design an network client with user program.

2013-04-10 Thread Michael Snoyman
It doesn't seem like you're trying to perform multiple actions simultaneously. For example, you don't need to be able to read from the server and send data back at the same time. Instead, you'll have a single thread of execution. Am I right? If so, it seems like the simplest thing would be for you

[Haskell-cafe] How to design an network client with user program.

2013-04-09 Thread Alexander V Vershilov
Hello. I have next problem: I have a network client that connects to server, listens for messages and generate responces. So the control flow can be represended as: server -- input -> {generate output} -> output Output can be generated using default implementation or can overriden by user. The