socketIO-client icon indicating copy to clipboard operation
socketIO-client copied to clipboard

Allow passing additional args to constructors of Namespace classes

Open francoijs opened this issue 6 years ago • 0 comments

This PR adds the ability to pass extra args to constructor of user-defined namespaces through method SocketIO.define:

class MyNamespace(BaseNamespace):
    def __init__(self, socket, path, myid):
        self.myid = myid

socket = SocketIO(server, port)
ns = socket.define(MyNamespace, '/path', 'myid')

francoijs avatar May 10 '18 20:05 francoijs