Gjsify LogoGjsify Logo

Hierarchy

Index

Properties

asyncContext?: object
fd?: number
gsocket?: Gio.Socket
iostream?: IOStream
ipv6Only?: boolean
localAddress?: Soup.Address
nonBlocking?: 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.

remoteAddress?: Soup.Address
sslCreds?: object
sslFallback?: boolean
sslStrict?: boolean
timeout?: number
useThreadContext?: 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