Gjsify LogoGjsify Logo

Hierarchy

Index

Properties

async_context?: object
fd?: number
gsocket?: Gio.Socket
iostream?: IOStream
ipv6_only?: boolean
local_address?: Soup.Address
non_blocking?: boolean

Whether or not the socket uses non-blocking I/O.

#SoupSocket's I/O methods are designed around the idea of using a single codepath for both synchronous and asynchronous I/O. If you want to read off a #SoupSocket, the "correct" way to do it is to call soup_socket_read() or soup_socket_read_until() repeatedly until you have read everything you want. If it returns %SOUP_SOCKET_WOULD_BLOCK at any point, stop reading and wait for it to emit the #SoupSocket::readable signal. Then go back to the reading-as-much-as-you-can loop. Likewise, for writing to a #SoupSocket, you should call soup_socket_write() either until you have written everything, or it returns %SOUP_SOCKET_WOULD_BLOCK (in which case you wait for #SoupSocket::writable and then go back into the loop).

Code written this way will work correctly with both blocking and non-blocking sockets; blocking sockets will simply never return %SOUP_SOCKET_WOULD_BLOCK, and so the code that handles that case just won't get used for them.

remote_address?: Soup.Address
ssl_creds?: object
ssl_fallback?: boolean
ssl_strict?: boolean
timeout?: number
use_thread_context?: boolean

Use g_main_context_get_thread_default().

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method