Sha256: 68d9d98a25c01f7aa79a973a01d75dbc3656b8db607d7f0dc8eb53fd22b3a079
Contents?: true
Size: 825 Bytes
Versions: 13
Compression:
Stored size: 825 Bytes
Contents
import hashlib from javonet.utils.ConnectionType import ConnectionType from javonet.utils.connectionData.IConnectionData import IConnectionData class WsConnectionData(IConnectionData): def __init__(self, hostname: str): self._hostname = hostname @property def connection_type(self): return ConnectionType.WebSocket @property def hostname(self): return self._hostname def serialize_connection_data(self): return [self.connection_type.value, 0, 0, 0, 0, 0, 0] def __eq__(self, other): return isinstance(other, WsConnectionData) and self._hostname == other.hostname def __hash__(self): return int(hashlib.sha1(f"{self.hostname}".encode()).hexdigest(), 16) @hostname.setter def hostname(self, value): self._hostname = value
Version data entries
13 entries across 11 versions & 1 rubygems