python-trio / trio-websocket

WebSocket client and server implementation for Python Trio
MIT License
70 stars 26 forks source link

Expose local and remote socket info #108

Closed mehaase closed 5 years ago

mehaase commented 5 years ago

There is currently no way to get the IP address or port number for a websocket connection. The server class does have port and listeners properties that expose the locally bound addresses and ports (for TCP streams only), but there is no equivalent for handshakes or connections. WebSocketRequest and WebSocketConnection should expose IP addresses and ports for the local and remote endpoints whenever the underlying stream is TCP.

mehaase commented 5 years ago

(This was started but never finished in https://github.com/HyperionGray/trio-websocket/pull/63)