Sets our main struct and passes it to the parent class.
Emitted when the socket is disconnected, for whatever reason.
Emitted when a network-related event occurs. See #GSocketClient::event for more details.
Emitted when a listening socket (set up with soup_socket_listen()) receives a new connection.
Emitted when an async socket is readable. See soup_socket_read(), soup_socket_read_until() and #SoupSocket:non-blocking.
Emitted when an async socket is writable. See soup_socket_write() and #SoupSocket:non-blocking.
Begins asynchronously connecting to @sock's remote address. The socket will call @callback when it succeeds or fails (but not before returning from this function).
Attempt to synchronously connect @sock to its remote address.
Disconnects @sock. Any further read or write attempts on it will fail.
Gets @sock's underlying file descriptor.
Returns the #SoupAddress corresponding to the local end of @sock.
Returns the #SoupAddress corresponding to the remote end of @sock.
Get the main Gtk struct
the main Gtk struct as a void*
Tests if @sock is connected to another host
Tests if @sock is doing (or has attempted to do) SSL.
Makes @sock start listening on its local address. When connections come in, @sock will emit #SoupSocket::new_connection.
Attempts to read up to @len bytes from @sock into @buffer. If some data is successfully read, soup_socket_read() will return %SOUP_SOCKET_OK, and *@nread will contain the number of bytes actually read (which may be less than @len).
Like soup_socket_read(), but reads no further than the first occurrence of @boundary. (If the boundary is found, it will be included in the returned data, and *@got_boundary will be set to %TRUE.) Any data after the boundary will returned in future reads.
Starts using SSL on @socket, expecting to find a host named @ssl_host.
Starts using SSL on @socket.
Attempts to write @len bytes from @buffer to @sock. If some data is successfully written, the return status will be %SOUP_SOCKET_OK, and *@nwrote will contain the number of bytes actually written (which may be less than @len).
the main Gtk struct
#SoupSocket is libsoup's TCP socket type. While it is primarily intended for internal use, #SoupSocket<!-- -->s are exposed in the API in various places, and some of their methods (eg, soup_socket_get_remote_address()) may be useful to applications.