not sure what you exactly a trying to do:
“response from client”: the broadcast server does not receive responses, but just dispatches anything it receives to all currently connected clients.
Usually, a “response” is something a peer sends upon a “request” … that would be a “Request/Response” pattern. You might have a look at the WAMP examples that come with AutobahnPython. Those provide “Remote Procedure Calls” (= Request/Response) and PubSub. They also show how to do authentication. And WAMP also allows you to target specific clients, since WAMP assign unique session IDs to clients (which is needed, at least when referring a session from a different session).
Of course you could reinvent parts of WAMP on your own … however, I’d not recommend that, but instead first look if WAMP already provides what you need. If so, that’ll much quicker for you, and you also profit from the work done on WAMP now and in the future.
Am Donnerstag, 24. Oktober 2013 01:35:10 UTC+2 schrieb Kevin Helton:
Can you elaborate a bit or maybe provide a simple example. I have a broadcast server with multiple possible clients and am looking to target specific connects to close based on a response from the client. Really, I’m trying to do a simple password(pin) authentication and close connections that do not have the proper password. Any help will be appreciated!
On Sunday, September 9, 2012 10:40:50 AM UTC-7, Tobias Oberstein wrote:
Am 08.09.2012 23:20, schrieb Rizwan:
Hi, i am using the example of autobahn websocket server in python.
socket.close(), however if one wants to disconnect connected client from
the server how can this be done??
def sendClose(self, code = None, reason = None)
available on WebSocketServerProtocol and WebSocketClientProtocol
will start closing handshake … exactly as browser.