Fix inet_ntop endianness
Keep track of socket state
Add select
Update echo server example
Export select