(port, num)
处理服务情况,num为流编号（第0号还是第1号）
处理服务情况,num为流编号（第0号还是第1号）
处理服务情况 num为流编号（第0号还是第1号）
def _server(port, num):
	'''
	处理服务情况,num为流编号（第0号还是第1号）
	'''
	srv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
	srv.bind(('0.0.0.0', port))
	srv.listen(1)
	while True:
		conn, addr = srv.accept()
		print "connected from:", addr
		streams[num] = conn  # 放入本端流对象
		s2 = _get_another_stream(num)  # 获取另一端流对象
		_xstream(num, conn, s2)
def _server ( port , num ) : srv = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) srv . bind ( ( '0.0.0.0' , port ) ) srv . listen ( 1 ) while True : conn , addr = srv . accept ( ) print "connected from:" , addr streams [ num ] = conn # 放入本端流对象 s2 = _get_another_stream ( num ) # 获取另一端流对象 _xstream ( num , conn , s2 )