I’m combining my work at Trabe with doing my end of degree project - someday I’ll post about it. This end of degree project (EOP from now on) uses a nice amount of technologies being Erlang one of them.
A part of the EOP is a WebSocket endpoint built in Erlang (with cowboy). To run some automated test on this endpoint I needed a WebSocket client in Erlang that was conformant to the last WebSocket version, wich now is the RFC6455 for WebSocket version 13. To my dispair I could only find clients (not many) that were built for old versions of the protocol.
So…I had two choices:
- Skip all the tests wich involved using a client.
- Build a client wich implements the RFC6455.
So…being me I built it.
The result is wsecli, a WebSocket client writen in Erlang wich implements the aforementioned WebSocket rfc6455. It was a nice toy-project to get a deeper understanding of:
- Erlang’s bit sintax which kicks asses when having to deal with data at a bit/byte level. Oh, fuck yeah!
- WebSocket protocol itself.
Using this project as a base I’m now working on wsock, a library to help you build WebSocket clients (like wsecli) and servers in Erlang. That’s for a future post (woo, too may posts piling up).
If you have any doubt or question comment or tweet me at @madtrick.