Merge: Basic UDP socket
authorJean Privat <jean@pryen.org>
Mon, 20 Jul 2015 13:34:10 +0000 (09:34 -0400)
committerJean Privat <jean@pryen.org>
Mon, 20 Jul 2015 13:34:10 +0000 (09:34 -0400)
This PR intro `UDPSocket` and cleans up a bit of the native layer of socket to avoid using callbacks when possible.

`UDPSocket` support sending messages to remote sockets without a connection and more importantly receive message from any sender. However, as of yet it does not support connections or the stream API of Nit.

Some TODO with the sockets:
* Stop using `gethostbyname` :neutral_face:
* Decide on one or many APIs. The native layer has an API closed to the C API and to what is available in other languages, maybe it can be clean up further and exposed as is.

---
Please ignore the first 2 commits from #1573.

Pull-Request: #1574
Reviewed-by: Jean Privat <jean@pryen.org>


Trivial merge