OLD | NEW |
1 """ | 1 """ |
2 websocket - WebSocket client library for Python | 2 websocket - WebSocket client library for Python |
3 | 3 |
4 Copyright (C) 2010 Hiroki Ohtani(liris) | 4 Copyright (C) 2010 Hiroki Ohtani(liris) |
5 | 5 |
6 This library is free software; you can redistribute it and/or | 6 This library is free software; you can redistribute it and/or |
7 modify it under the terms of the GNU Lesser General Public | 7 modify it under the terms of the GNU Lesser General Public |
8 License as published by the Free Software Foundation; either | 8 License as published by the Free Software Foundation; either |
9 version 2.1 of the License, or (at your option) any later version. | 9 version 2.1 of the License, or (at your option) any later version. |
10 | 10 |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 if __name__ == "__main__": | 747 if __name__ == "__main__": |
748 enableTrace(True) | 748 enableTrace(True) |
749 ws = create_connection("ws://echo.websocket.org/") | 749 ws = create_connection("ws://echo.websocket.org/") |
750 print "Sending 'Hello, World'..." | 750 print "Sending 'Hello, World'..." |
751 ws.send("Hello, World") | 751 ws.send("Hello, World") |
752 print "Sent" | 752 print "Sent" |
753 print "Receiving..." | 753 print "Receiving..." |
754 result = ws.recv() | 754 result = ws.recv() |
755 print "Received '%s'" % result | 755 print "Received '%s'" % result |
756 ws.close() | 756 ws.close() |
OLD | NEW |