UWNetworksLab/freedom — pull request #52 by yangoon (2014-02-26 16:57:36+00:00)
Title: add interface for core.udpsocket

This adds core.udpsocket, for UDP-based communication.

I have an implementation and some client code which uses this which I'm happy to share if you like but I reckon the API is so simple you may not need it.

This is much simpler than core.socket for two reasons:
- UDP's much simpler than TCP!
- I ran into some issues with core.socket due to my misunderstanding of event handling so I wanted to make clear that core.udpsocket represents *a* UDP socket and is not just a thin layer over the Unix/Chrome sockets API (make sense?)

Question: Is it possible to supply arguments to a Freedom API constructor? I'd love to dispense with bind() and instead pass the address and port to the constructor -- it would further reduce the API and reduce state.

I will rename core.socket -> core.tcpsocket in a followup.