
Io::socket provides a way to set a timeout on the socket, but the timeout will be used only for connection, not for reading / writing operations.
io::socket::timeout provides a way to set a timeout on read / write operations on an io::socket instance, or any io::socket::* modules, like io::socket::inet.