本文整理匯總了Python中shadowsocks.eventloop.get_sock_error方法的典型用法代碼示例。如果您正苦於以下問題:Python eventloop.get_sock_error方法的具體用法?Python eventloop.get_sock_error怎麽用?Python eventloop.get_sock_error使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類shadowsocks.eventloop
的用法示例。
在下文中一共展示了eventloop.get_sock_error方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _on_remote_error
# 需要導入模塊: from shadowsocks import eventloop [as 別名]
# 或者: from shadowsocks.eventloop import get_sock_error [as 別名]
def _on_remote_error(self):
logging.debug('got remote error')
if self._remote_sock:
logging.error(eventloop.get_sock_error(self._remote_sock))
if self._remote_address:
logging.error(
"when connect to %s:%d from %s:%d via port %d" %
(self._remote_address[0],
self._remote_address[1],
self._client_address[0],
self._client_address[1],
self._server._listen_port))
else:
logging.error(
"exception from %s:%d" %
(self._client_address[0],
self._client_address[1]))
self.destroy()
示例2: _on_local_error
# 需要導入模塊: from shadowsocks import eventloop [as 別名]
# 或者: from shadowsocks.eventloop import get_sock_error [as 別名]
def _on_local_error(self):
logging.debug('got local error')
if self._local_sock:
logging.error(eventloop.get_sock_error(self._local_sock))
self.destroy()
示例3: _on_remote_error
# 需要導入模塊: from shadowsocks import eventloop [as 別名]
# 或者: from shadowsocks.eventloop import get_sock_error [as 別名]
def _on_remote_error(self):
logging.debug('got remote error')
if self._remote_sock:
logging.error(eventloop.get_sock_error(self._remote_sock))
self.destroy()
示例4: _on_local_error
# 需要導入模塊: from shadowsocks import eventloop [as 別名]
# 或者: from shadowsocks.eventloop import get_sock_error [as 別名]
def _on_local_error(self):
if self._local_sock:
err = eventloop.get_sock_error(self._local_sock)
if err.errno not in [errno.ECONNRESET, errno.EPIPE]:
logging.error(err)
logging.error("local error, exception from %s:%d" % (self._client_address[0], self._client_address[1]))
self.destroy()
示例5: _on_remote_error
# 需要導入模塊: from shadowsocks import eventloop [as 別名]
# 或者: from shadowsocks.eventloop import get_sock_error [as 別名]
def _on_remote_error(self):
if self._remote_sock:
err = eventloop.get_sock_error(self._remote_sock)
if err.errno not in [errno.ECONNRESET]:
logging.error(err)
if self._remote_address:
logging.error("remote error, when connect to %s:%d" % (self._remote_address[0], self._remote_address[1]))
else:
logging.error("remote error, exception from %s:%d" % (self._client_address[0], self._client_address[1]))
self.destroy()
示例6: _on_local_error
# 需要導入模塊: from shadowsocks import eventloop [as 別名]
# 或者: from shadowsocks.eventloop import get_sock_error [as 別名]
def _on_local_error(self):
logging.debug('got local error')
if self._local_sock:
logging.error(eventloop.get_sock_error(self._local_sock))
logging.error("exception from %s:%d" % (self._client_address[0], self._client_address[1]))
self.destroy()
示例7: _on_remote_error
# 需要導入模塊: from shadowsocks import eventloop [as 別名]
# 或者: from shadowsocks.eventloop import get_sock_error [as 別名]
def _on_remote_error(self):
logging.debug('got remote error')
if self._remote_sock:
logging.error(eventloop.get_sock_error(self._remote_sock))
if self._remote_address:
logging.error("when connect to %s:%d" % (self._remote_address[0], self._remote_address[1]))
else:
logging.error("exception from %s:%d" % (self._client_address[0], self._client_address[1]))
self.destroy()
示例8: _on_local_error
# 需要導入模塊: from shadowsocks import eventloop [as 別名]
# 或者: from shadowsocks.eventloop import get_sock_error [as 別名]
def _on_local_error(self):
logging.debug('got local error')
if self._local_sock:
logging.error(eventloop.get_sock_error(self._local_sock))
logging.error(
"exception from %s:%d" %
(self._client_address[0],
self._client_address[1]))
self.destroy()