def prepareAddress(self):
host, port = self.addr
if iocpdebug.debug:
print "connecting to (%s, %s)" % (host, port)
if isinstance(port, types.StringTypes):
try:
port = socket.getservbyname(port, 'tcp')
except socket.error, e:
raise error.ServiceNameUnknownError(string=str(e))
self.addr= (host, port)
评论列表
文章目录