Skip to content

Commit

Permalink
add impl of transport_details in wamp rawsocket base (#1554)
Browse files Browse the repository at this point in the history
  • Loading branch information
oberstet committed Apr 27, 2022
1 parent bbdadcb commit cec0e99
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion autobahn/twisted/rawsocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ class WampRawSocketProtocol(Int32StringReceiver):
def __init__(self):
# set the RawSocket maximum message size by default
self._max_message_size = 2**24
self._transport_details = None

@property
def transport_details(self) -> Optional[TransportDetails]:
"""
Implements :func:`autobahn.wamp.interfaces.ITransport.transport_details`
"""
return self._transport_details

def lengthLimitExceeded(self, length):
# override hook in Int32StringReceiver base class that is fired when a message is (to be) received
Expand All @@ -74,7 +82,7 @@ def connectionMade(self):

# determine preliminary transport details (what is know at this point)
self._transport_details = create_transport_details(self.transport, self.is_server)
self._transport_details.channel_framing = TransportDetails.CHANNEL_FRAMING_WEBSOCKET
self._transport_details.channel_framing = TransportDetails.CHANNEL_FRAMING_RAWSOCKET

# backward compatibility
self.peer = self._transport_details.peer
Expand Down

0 comments on commit cec0e99

Please sign in to comment.