Closed easymavinmind closed 5 years ago
Already does, in your handleConnected() the "/test" is available in self.request.path . If you want to reject the connection if the wrong path is given just have handleConnected() call close(), or clear self.sendq and build the reject response yourself.
In the example, we can configure our desired port in (such as 8000 or something else)
SimpleWebSocketServer('', 8000, SimpleChat)
can we configure the extra path so our client accessing something like
ws://localhost:8000/test"
?