Created
April 3, 2015 22:04
-
-
Save httpNick/03877ce4891924a8c0dc to your computer and use it in GitHub Desktop.
This file contains 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
__author__ = 'httpnick' | |
from socketIO_client import SocketIO, LoggingNamespace | |
def getInHereResponse(*args): | |
print(args[0]) | |
def getConnectionResponse(*args): | |
print('connection count: ' + str(args[0])) | |
socketIO = SocketIO('localhost', 8888, LoggingNamespace) | |
socketIO.on('isInHereResponse', getInHereResponse) | |
socketIO.on('connectionCountResponse', getConnectionResponse) | |
socketIO.emit('connectionCount') | |
socketIO.emit('isInHere', 'aaaaa') | |
socketIO.wait(seconds=3) | |
socketIO.disconnect() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment