File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ class WebSocketsHandler(SocketServer.StreamRequestHandler):
84
84
def setup (self ):
85
85
global clients
86
86
SocketServer .StreamRequestHandler .setup (self )
87
- print 'websocket connection established' , self .client_address
87
+ print ( 'websocket connection established' , self .client_address )
88
88
self .handshake_done = False
89
89
90
90
def handle (self ):
@@ -133,7 +133,7 @@ def handshake(self):
133
133
headers = Message (StringIO (data .split ('\r \n ' , 1 )[1 ]))
134
134
# if headers.get("Upgrade", None) != "websocket":
135
135
# return
136
- print 'Handshaking...'
136
+ print ( 'Handshaking...' )
137
137
key = headers ['Sec-WebSocket-Key' ]
138
138
digest = b64encode (sha1 (key + self .magic ).hexdigest ().decode ('hex' ))
139
139
response = 'HTTP/1.1 101 Switching Protocols\r \n '
@@ -152,7 +152,7 @@ def on_message(self, message):
152
152
if not self in clients [k ].websockets :
153
153
clients [k ].websockets .append (self )
154
154
print ('on_message\n ' )
155
- print 'recv from websocket client: ' + message
155
+ print ( 'recv from websocket client: ' + message )
156
156
157
157
# parsing messages
158
158
chunks = message .split ('/' )
You can’t perform that action at this time.
0 commit comments