[web-devel] A WebSocket library

Jasper Van der Jeugt m at jaspervdj.be
Mon Sep 26 10:33:36 CEST 2011

Hi Chris,

> The interface to the application programmer is less clear.  Is the
> expectation that you'd use the WebSocketData type class?

I want the library to be flexible for both high- and low-level
scenarios. Basically, there are three ways to use the library:

* For a really low-level server (e.g. you want to send control frames
such as pings yourself), you can use the `sendFrame`, `receiveFrame`,
`sendMessage` and `receiveMessage` methods.

* For a typical application, you would indeed use `sendDataMessage`
and `receiveDataMessage`, as you said.

* In some cases, the user doesn't care about the internal
representation of frames (binary or text), and he just wants to send
and receive messages in some format. For this scenario, there is the
`WebSocketsData` typeclass, and the `receiveData` method.

I hope this clears things up a little (I'll add an explanation like
this to the docs),

More information about the web-devel mailing list