OLD | NEW |
1 # Copyright (C) Research In Motion Limited 2011. All rights reserved. | 1 # Copyright (C) Research In Motion Limited 2011. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without modificatio
n, are permitted provided that the | 3 # Redistribution and use in source and binary forms, with or without modificatio
n, are permitted provided that the |
4 # following conditions are met: | 4 # following conditions are met: |
5 # | 5 # |
6 # 1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following | 6 # 1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following |
7 # disclaimer. | 7 # disclaimer. |
8 # | 8 # |
9 # 2. Redistributions in binary form must reproduce the above copyright notice, t
his list of conditions and the | 9 # 2. Redistributions in binary form must reproduce the above copyright notice, t
his list of conditions and the |
10 # following disclaimer in the documentation and/or other materials provided with
the distribution. | 10 # following disclaimer in the documentation and/or other materials provided with
the distribution. |
(...skipping 21 matching lines...) Expand all Loading... |
32 msg += 'Upgrade: websocket\r\n' | 32 msg += 'Upgrade: websocket\r\n' |
33 msg += 'Connection: Upgrade\r\n' | 33 msg += 'Connection: Upgrade\r\n' |
34 msg += 'Sec-WebSocket-Accept: %s\r\n' % compute_accept(request.headers_in['S
ec-WebSocket-Key'])[0] | 34 msg += 'Sec-WebSocket-Accept: %s\r\n' % compute_accept(request.headers_in['S
ec-WebSocket-Key'])[0] |
35 msg += '\r\n' | 35 msg += '\r\n' |
36 request.connection.write(msg) | 36 request.connection.write(msg) |
37 raise handshake.AbortedByUserException('abort the connection') # Prevents py
websocket from sending its own handshake message. | 37 raise handshake.AbortedByUserException('abort the connection') # Prevents py
websocket from sending its own handshake message. |
38 | 38 |
39 | 39 |
40 def web_socket_transfer_data(request): | 40 def web_socket_transfer_data(request): |
41 pass | 41 pass |
OLD | NEW |