Lines Matching +full:write +full:- +full:host
6 # telnet commands, but can still be used to connect in line-by-line mode.
10 # Usage: telnet host [port]
32 sys.stderr.write('usage: telnet hostname [port]\n')
34 host = sys.argv[1]
36 hostaddr = gethostbyname(host)
38 sys.stderr.write(sys.argv[1] + ': bad host name\n')
52 sys.stderr.write(servname + ': bad tcp service name\n')
58 s.connect((host, port))
60 sys.stderr.write('connect failed: %r\n' % (msg,))
67 # read socket, write stdout
73 # EOF -- exit
74 sys.stderr.write( '(Closed by remote host)\n')
102 sys.stdout.write(cleandata)
107 # read stdin, write socket