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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 # continue writing data until the client disconnects | 43 # continue writing data until the client disconnects |
44 while True: | 44 while True: |
45 time.sleep(1) | 45 time.sleep(1) |
46 numFrames = 1024 / len(frame) # write over 1024 bytes including the abov
e handshake | 46 numFrames = 1024 / len(frame) # write over 1024 bytes including the abov
e handshake |
47 for i in range(0, numFrames): | 47 for i in range(0, numFrames): |
48 request.connection.write(frame) | 48 request.connection.write(frame) |
49 | 49 |
50 | 50 |
51 def web_socket_transfer_data(request): | 51 def web_socket_transfer_data(request): |
52 pass | 52 pass |
OLD | NEW |