Documentation
¶
Overview ¶
Package pyaiohttpws is a client websocket with the receive, close and heartbeat behaviour of aiohttp
Index ¶
Constants ¶
const ( UserAgent = "Python/3.14 aiohttp/3.14.5" Accept = "*/*" AcceptEncoding = "gzip, deflate, zstd" )
Session default headers of the pinned aiohttp 3.14.5 on Python 3.14 with zstd importable and Brotli absent
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
One open client websocket with its reader, heartbeat and close state
func Connect ¶
Opens a client websocket the way a session ws_connect does, the upgrade bounded by the session total timeout
func (*Conn) Close ¶
Sends the close frame, waits the close timeout for the peer to end the stream and drops the connection
func (*Conn) Closed ¶
Whether the websocket is closed as its owner has seen it, by a local close or a received end of stream
type ConnectionResetError ¶
type ConnectionResetError struct{}
ClientConnectionResetError of a write on a websocket that is closing or closed
func (*ConnectionResetError) Error ¶
func (e *ConnectionResetError) Error() string
func (*ConnectionResetError) PyTypeName ¶
func (e *ConnectionResetError) PyTypeName() string
type ConnectorError ¶
ClientConnectorError of a websocket that could not connect, Err the os_error behind it
func (*ConnectorError) Error ¶
func (e *ConnectorError) Error() string
func (*ConnectorError) PyTypeName ¶
func (e *ConnectorError) PyTypeName() string
func (*ConnectorError) Unwrap ¶
func (e *ConnectorError) Unwrap() error
type HandshakeError ¶
WSServerHandshakeError of an upgrade the server refused
func (*HandshakeError) Error ¶
func (e *HandshakeError) Error() string
func (*HandshakeError) PyTypeName ¶
func (e *HandshakeError) PyTypeName() string
type Message ¶
One received message, Data a string for text, bytes for binary, the close code for close and the error for error
type MessageTooBigError ¶
WebSocketError of a received message at or over the max_msg_size limit
func (*MessageTooBigError) Error ¶
func (e *MessageTooBigError) Error() string
func (*MessageTooBigError) PyRepr ¶
func (e *MessageTooBigError) PyRepr() string
func (*MessageTooBigError) PyTypeName ¶
func (e *MessageTooBigError) PyTypeName() string
type Options ¶
type Options struct {
// Silence before a ping is sent, its pong due within half of it
Heartbeat time.Duration
// Wait for the peer's close frame on close, ten seconds when zero
CloseTimeout time.Duration
// Proxy settings read from the environment
TrustEnv bool
// Explicit proxy URL that wins over the environment
Proxy string
TLSConfig *tls.Config
Header http.Header
// Text aiohttp prints for the ssl argument in a connect error, default when empty
SSLLabel string
// Message size refused as too big at or over this many bytes, zero for no limit
MaxMsgSize int64
}
Keywords of one ws_connect call
type ServerTimeoutError ¶
type ServerTimeoutError struct{ PongSeconds float64 }
ServerTimeoutError of a heartbeat whose pong never arrived within the pong window
func (*ServerTimeoutError) Error ¶
func (e *ServerTimeoutError) Error() string
func (*ServerTimeoutError) PyTypeName ¶
func (e *ServerTimeoutError) PyTypeName() string