add is_socket, use to implement posix_read/write

I'm not sure yet if errno from recv maps 100% to read, likewise for
send/write.
add licenses