def create_slack_websocket(self, data):
web_socket_url = data['url']
try:
self.ws = create_connection(web_socket_url, sslopt=sslopt_ca_certs)
self.ws_hook = w.hook_fd(self.ws.sock._sock.fileno(), 1, 0, 0, "slack_websocket_cb", self.identifier)
self.ws.sock.setblocking(0)
return True
except Exception as e:
print("websocket connection error: {}".format(e))
return False
评论列表
文章目录