GObject.Object
 Soup.Socket
                Soup.Socket
		   
| Import line: | Soup = imports.gi.Soup; | 
| GIR File: | Soup-2.4.gir | 
| C documentation: | SoupSocket | 
| Class : | Socket | 
| Extends: | GObject.Object | 
| Properties | Defined By | |
|---|---|---|
| 
				async_context : void* 
                   
                     
			 | Soup.Socket | |
| 
				clean_dispose : gboolean 
                   
                     
			 | Soup.Socket | |
| 
				is_server : gboolean 
                 read only  
                     
			 | Soup.Socket | |
| 
				local_address : Soup.Address 
                   
                     
			 | Soup.Socket | |
| 
				non_blocking : gboolean 
                   
                     
			 | Soup.Socket | |
| 
				parent : GObject.Object 
                 read only  
                     
			 | Soup.Socket | |
| 
				remote_address : Soup.Address 
                   
                     
			 | Soup.Socket | |
| 
				ssl_creds : void* 
                   
                     
			 | Soup.Socket | |
| 
				ssl_strict : gboolean 
                   
                     
			 | Soup.Socket | |
| 
				timeout : guint32 
                   
                     
			 | Soup.Socket | |
| 
				tls_certificate : Gio.TlsCertificate 
                 read only  
                     
			 | Soup.Socket | |
| 
				tls_errors : Gio.TlsCertificateFlags 
                 read only  
                     
			 | Soup.Socket | |
| 
				trusted_certificate : gboolean 
                 read only  
                     
			 | Soup.Socket | |
| Method / Constructor | Defined By | |
|---|---|---|
| 
			new  Soup.Socket
				
				 (Object properties) 
			
				
			
		 Create a new Soup.Socket 
			
			
			
				Create a new Soup.Socket
			
			
				 
 | ||
| Begins asynchronously connecting to sock's remote address. 
			
				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). If cancellable is non-NULL, it can be used to cancel the connection. callback will still be invoked in this case, with a status of SOUP_STATUS_CANCELLED. 
 
 | Soup.Socket | |
| 
			connect_sync
				
				 (Cancellable cancellable) 
			
				
					 : 
					guint32
					
				
			
		 Attempt to synchronously connect sock to its remote address. 
			
				Attempt to synchronously connect sock to its remote address. If cancellable is non-NULL, it can be used to cancel the connection, in which case soup_socket_connect_sync() will return SOUP_STATUS_CANCELLED. 
 
 | Soup.Socket | |
| 
			disconnect
				
				 () 
			
				
					 : 
					none
					
				
			
		 Disconnects sock. 
			
				Disconnects sock. Any further read or write attempts on it will fail. 
 | Soup.Socket | |
| 
			get_fd
				
				 () 
			
				
					 : 
					gint32
					
				
			
		 
 | Soup.Socket | |
| 
			get_local_address
				
				 () 
			
				
					 : 
					Soup.Address
					
				
			
		 Returns the SoupAddress corresponding to the local end of sock. 
			
				Returns the SoupAddress corresponding to the local end of sock.
		    
				
			
			
			
			
			
			 
			
			
				 
 | Soup.Socket | |
| 
			get_remote_address
				
				 () 
			
				
					 : 
					Soup.Address
					
				
			
		 Returns the SoupAddress corresponding to the remote end of sock. 
			
				Returns the SoupAddress corresponding to the remote end of sock.
		    
				
			
			
			
			
			
			 
			
			
				 
 | Soup.Socket | |
| 
			is_connected
				
				 () 
			
				
					 : 
					gboolean
					
				
			
		 Tests if sock is connected to another host 
			
				Tests if sock is connected to another host
		    
				
			
			
			
			
			
			 
			
			
				 
 | Soup.Socket | |
| 
			is_ssl
				
				 () 
			
				
					 : 
					gboolean
					
				
			
		 Tests if sock is set up to do SSL. 
			
				Tests if sock is set up to do SSL. Note that this simply means that the SOUP_SOCKET_SSL_CREDENTIALS property has been set; it does not mean that soup_socket_start_ssl() has been called. 
 | Soup.Socket | |
| 
			listen
				
				 () 
			
				
					 : 
					gboolean
					
				
			
		 Makes sock start listening on its local address. 
			
				Makes sock start listening on its local address. When connections come in, sock will emit new_connection. 
 | Soup.Socket | |
| Attempts to read up to len bytes from sock into buffer. 
			
				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). If sock is non-blocking, and no data is available, the return value will be SOUP_SOCKET_WOULD_BLOCK. In this case, the caller can connect to the SoupSocket::readable signal to know when there socket first. SoupSocket::readable is only emitted after soup_socket_read() returns SOUP_SOCKET_WOULD_BLOCK, and it is only emitted once. See the documentation for SoupSocket:non-blocking.) SOUP_SOCKET_EOF if the socket is no longer connected, or SOUP_SOCKET_ERROR on any other error, in which case error will also be set). 
 
 | Soup.Socket | |
| 
			read_until
				
				 (void* buffer, guint32 len, void* boundary, guint32 boundary_len, guint32 nread, gboolean got_boundary, Cancellable cancellable) 
			
				
					 : 
					Soup.SocketIOStatus
					
				
			
		 Like soup_socket_read(), but reads no further than the first occurrence of boundary. 
			
				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. soup_socket_read_until() will almost always return fewer than len up until the end of the boundary, and if the boundary is not found, then it will leave the last bytes in its internal buffer, in case they form the start of the boundary string. Thus, len normally needs to be at least 1 byte longer than boundary_len if you want to make any progress at all. 
 
 | Soup.Socket | |
| Starts using SSL on socket, expecting to find a host named 
			
				Starts using SSL on socket, expecting to find a host named
		    
				
			
			
			
			
				 
 
 | Soup.Socket | |
| 
			start_ssl
				
				 (Cancellable cancellable) 
			
				
					 : 
					gboolean
					
				
			
		 Starts using SSL on socket. 
			
				Starts using SSL on socket.
		    
				
			
			
			
			
				 
 
 | Soup.Socket | |
| Attempts to write len bytes from buffer to sock. 
			
				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). If sock is non-blocking, and no data could be written right away, the return value will be SOUP_SOCKET_WOULD_BLOCK. In this case, the caller can connect to the SoupSocket::writable signal to know emitted after soup_socket_write() returns SOUP_SOCKET_WOULD_BLOCK, and it is only emitted once. See the documentation for SoupSocket:non-blocking.) SOUP_SOCKET_EOF or SOUP_SOCKET_ERROR. error will be set if the return value is SOUP_SOCKET_ERROR.) 
 
 | Soup.Socket | |
| Event | Defined By | |
|---|---|---|
| 
		disconnected (Socket self) 
                : 
					none
					
        
        
		 
 
 | Soup.Socket | |
| 
 
 | Soup.Socket | |
| 
		readable (Socket self) 
                : 
					none
					
        
        
		 
 
 | Soup.Socket | |
| 
		writable (Socket self) 
                : 
					none
					
        
        
		 
 
 | Soup.Socket | |
| Class / Namespace | Method / Signal / Properties | 
|---|---|
| Soup.ClientContext Method | 
			get_socket
				
				 () 
			
				
					 : 
					Soup.Socket
					
				
			
		 Retrieves the SoupSocket that client is associated with. | 
| Soup.Server Method | 
			get_listener
				
				 () 
			
				
					 : 
					Soup.Socket
					
				
			
		 Gets server's listening socket. | 
| Soup.Session Signal |  |