This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*********************************************************************** | |
| ** Copyright (C) 2010 Movid Authors. All rights reserved. | |
| ** | |
| ** This file is part of the Movid Software. | |
| ** | |
| ** This file may be distributed under the terms of the Q Public License | |
| ** as defined by Trolltech AS of Norway and appearing in the file | |
| ** LICENSE included in the packaging of this file. | |
| ** | |
| ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from zmq import FORWARDER, PUB, SUB, SUBSCRIBE | |
| from zmq.devices import Device | |
| if __name__ == "__main__": | |
| usage = 'usage: chat_bridge pub_address sub_address' | |
| if len (sys.argv) != 3: | |
| print usage | |
| sys.exit(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import eventlet, sys | |
| from eventlet.green import socket, zmq | |
| from eventlet.hubs import use_hub | |
| use_hub('zeromq') | |
| ADDR = 'ipc:///tmp/chat' | |
| ctx = zmq.Context() | |
| def publish(writer): |
NewerOlder