TcpWrapperConnection

open class TcpWrapperConnection(pointer: <Error class: unknown class><<Error class: unknown class>>) : TcpConnection

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

Since

2.28

Constructors

Link copied to clipboard
constructor(baseIoStream: IoStream, socket: Socket)

Wraps @base_io_stream and @socket together as a #GSocketConnection.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The wrapped class@Gio.IOStream.

Link copied to clipboard
val gioIOStreamPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gioSocketConnectionPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gioTcpConnectionPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gioTcpWrapperConnectionPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

Whether method@Gio.IOStream.close does a graceful disconnect.

Link copied to clipboard

The class@Gio.InputStream to read from.

Link copied to clipboard

The class@Gio.OutputStream to write to.

Link copied to clipboard
open val socket: Socket

The underlying class@Gio.Socket.

Functions

Link copied to clipboard
open fun clearPending()

Clears the pending flag on @stream.

Link copied to clipboard
open fun close(cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

Closes the stream, releasing resources related to it. This will also close the individual input and output streams, if they are not already closed.

Link copied to clipboard
open fun closeAsync(ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Requests an asynchronous close of the stream, releasing resources related to it. When the operation is finished @callback will be called. You can then call g_io_stream_close_finish() to get the result of the operation.

Link copied to clipboard
open fun closeFinish(result: AsyncResult): <Error class: unknown class><Boolean>

Closes a stream.

Link copied to clipboard
open fun connect(address: SocketAddress, cancellable: Cancellable? = null): <Error class: unknown class><Boolean>

Connect @connection to the specified remote address.

Link copied to clipboard
open fun connectAsync(address: SocketAddress, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Asynchronously connect @connection to the specified remote address.

Link copied to clipboard
open fun connectFinish(result: AsyncResult): <Error class: unknown class><Boolean>

Gets the result of a g_socket_connection_connect_async() call.

Link copied to clipboard
open fun getLocalAddress(): <Error class: unknown class><SocketAddress>

Try to get the local address of a socket connection.

Link copied to clipboard
open fun getRemoteAddress(): <Error class: unknown class><SocketAddress>

Try to get the remote address of a socket connection.

Link copied to clipboard
open fun hasPending(): Boolean

Checks if a stream has pending actions.

Link copied to clipboard
open fun isClosed(): Boolean

Checks if a stream is closed.

Link copied to clipboard
open fun isConnected(): Boolean

Checks if @connection is connected. This is equivalent to calling g_socket_is_connected() on @connection's underlying #GSocket.

Link copied to clipboard
open fun setPending(): <Error class: unknown class><Boolean>

Sets @stream to have actions pending. If the pending flag is already set or @stream is closed, it will return false and set

Link copied to clipboard
open fun spliceAsync(stream2: IoStream, flags: IoStreamSpliceFlags, ioPriority: <Error class: unknown class>, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Asynchronously splice the output stream of @stream1 to the input stream of