Merge remote branch 'upstream/master', after #110 was merged.

This commit is contained in:
Peter Åstrand (astrand) 2013-12-16 16:18:41 +01:00
commit f64e3dea51
5 changed files with 5 additions and 5 deletions

View File

@ -98,7 +98,7 @@ Sec-WebSocket-Accept: %s\r
begin
t[:client] = do_handshake(io)
new_client(t[:client])
new_websocket_client(t[:client])
rescue EClose => e
msg "Client closed: #{e.message}"
return

View File

@ -39,7 +39,7 @@ Traffic Legend:
end
# Echo back whatever is received
def new_client(client)
def new_websocket_client(client)
msg "connecting to: %s:%s" % [@target_host, @target_port]
tsock = TCPSocket.open(@target_host, @target_port)

View File

@ -12,7 +12,7 @@ require 'websocket'
class WebSocketEcho < WebSocketServer
# Echo back whatever is received
def new_client(client)
def new_websocket_client(client)
cqueue = []
c_pend = 0

View File

@ -124,4 +124,4 @@ class WebSocketProxyTest(unittest.TestCase):
return ins, outs, excepts
self.stubs.Set(select, 'select', mock_select)
self.assertRaises(Exception, web_socket_proxy.new_client)
self.assertRaises(Exception, web_socket_proxy.new_websocket_client)

View File

@ -893,7 +893,7 @@ class WebSocketServer(object):
"""
Daemonize if requested. Listen for for connections. Run
do_handshake() method for each connection. If the connection
is a WebSockets client then call new_client() method (which must
is a WebSockets client then call new_websocket_client() method (which must
be overridden) for each new client connection.
"""
lsock = self.socket(self.listen_host, self.listen_port, False,