Changed tty input code to use read_socket_hook.