Skip to content

Gio.TcpWrapperConnection

class — extends TcpConnection

A GTcpWrapperConnection can be used to wrap a IOStream that is based on a Socket, but which is not actually a SocketConnection. This is used by SocketClient so that it can always return a SocketConnection, even when the connection it has actually created is not directly a SocketConnection.

Constructors

new

@classmethod
def new(cls, base_io_stream: IOStream, socket: Socket) -> SocketConnection

Wraps base_io_stream and socket together as a SocketConnection.

Parameters:

  • base_io_stream — the IOStream to wrap
  • socket — the Socket associated with base_io_stream

Methods

get_base_io_stream

def get_base_io_stream(self) -> IOStream

Gets conn's base IOStream

Properties

base_io_stream

base_io_stream: IOStream  # read/write

The wrapped IOStream.