Lines Matching refs:port
41 def open_socket(host, port): argument
42 if not port:
43 port = DEF_PORT
44 elif type(port) == type(''):
45 port = string.atoi(port)
47 s.connect((host, port))
51 def send_request(selector, host, port): argument
52 s = open_socket(host, port)
58 def get_menu(selector, host, port): argument
59 f = send_request(selector, host, port)
88 def get_textfile(selector, host, port): argument
90 get_alt_textfile(selector, host, port, list.append)
94 def get_alt_textfile(selector, host, port, func): argument
95 f = send_request(selector, host, port)
113 def get_binary(selector, host, port): argument
114 f = send_request(selector, host, port)
120 def get_alt_binary(selector, host, port, func, blocksize): argument
121 f = send_request(selector, host, port)
134 port = DEF_PORT
141 port = args[2]
145 browse_menu(selector, host, port)
153 def browse_menu(selector, host, port): argument
154 list = get_menu(selector, host, port)
158 print 'Host:', host, ' Port:', port
199 def browse_textfile(selector, host, port): argument
204 get_alt_textfile(selector, host, port, x.writeln)
214 get_alt_textfile(selector, host, port, x.writeln)
221 def browse_search(selector, host, port): argument
225 print 'Host:', host, ' Port:', port
238 browse_menu(selector + TAB + query, host, port)
241 def browse_telnet(selector, host, port): argument
244 if type(port) <> type(''):
245 port = repr(port)
246 sts = os.system('set -x; exec telnet ' + host + ' ' + port)
251 def browse_binary(selector, host, port): argument
256 get_alt_binary(selector, host, port, x.write, 8*1024)
260 def browse_sound(selector, host, port): argument
261 browse_binary(selector, host, port)
333 port = string.atoi(sys.argv[2])
339 port = ''
340 browser(selector, host, port)