Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: SocketCtors

[966:14] static extends: object

Alternate constructors for Socket. Usage: SocketCtors.<name>(...). The primary constructor lives directly on Socket.

Methods

  • newFromFd (int fd)

    Creates a new #GSocket from a native file descriptor or winsock SOCKET handle. This reads all the settings from the file descriptor so that all properties should work. Note that the file descriptor will be set to non-blocking mode, independent on the blocking mode of the #GSocket. On success, the returned #GSocket takes ownership of @fd. On failure, the caller must close @fd themselves. Since GLib 2.46, it is no longer a fatal error to call this on a non-socket descriptor. Instead, a GError will be set with code %G_IO_ERROR_FAILED

    • @p fd is a native socket file descriptor..
    • @r A new Socket.

class: Socket

[61:7] extends: object

A GSocket is a low-level networking primitive. It is a more or less direct mapping of the BSD socket API in a portable GObject based API. It supports both the UNIX socket implementations and winsock2 on Windows. GSocket is the platform independent base upon which the higher level network primitives are based. Applications are not typically meant to use it directly, but rather through classes like [class@Gio.SocketClient], [class@Gio.SocketService] and [class@Gio.SocketConnection]. However there may be cases where direct use of GSocket is useful. GSocket implements the [iface@Gio.Initable] interface, so if it is manually constructed by e.g. [ctor@GObject.Object.new] you must call [method@Gio.Initable.init] and check the results before using the object. This is done automatically in [ctor@Gio.Socket.new] and [ctor@Gio.Socket.new_from_fd], so these functions can return NULL. Sockets operate in two general modes, blocking or non-blocking. When in blocking mode all operations (which don’t take an explicit blocking parameter) block until the requested operation is finished or there is an error. In non-blocking mode all calls that would block return immediately with a G_IO_ERROR_WOULD_BLOCK error. To know when a call would successfully run you can call [method@Gio.Socket.condition_check], or [method@Gio.Socket.condition_wait]. You can also use [method@Gio.Socket.create_source] and attach it to a [type@GLib.MainContext] to get callbacks when I/O is possible. Note that all sockets are always set to non blocking mode in the system, and blocking mode is emulated in GSocket. When working in non-blocking mode applications should always be able to handle getting a G_IO_ERROR_WOULD_BLOCK error even when some other function said that I/O was possible. This can easily happen in case of a race condition in the application, but it can also happen for other reasons. For instance, on Windows a socket is always seen as writable until a write returns G_IO_ERROR_WOULD_BLOCK. GSockets can be either connection oriented or datagram based. For connection oriented types you must first establish a connection by either connecting to an address or accepting a connection from another address. For connectionless socket types the target/source address is specified or received in each I/O operation. All socket file descriptors are set to be close-on-exec. Note that creating a GSocket causes the signal SIGPIPE to be ignored for the remainder of the program. If you are writing a command-line utility that uses GSocket, you may need to take into account the fact that your program will not automatically be killed if it tries to write to stdout after it has been closed. Like most other APIs in GLib, GSocket is not inherently thread safe. To use a GSocket concurrently from multiple threads, you must implement your own locking. ## Nagle’s algorithm Since GLib 2.80, GSocket will automatically set the TCP_NODELAY option on all G_SOCKET_TYPE_STREAM sockets. This disables Nagle’s algorithm as it typically does more harm than good on modern networks. If your application needs Nagle’s algorithm enabled, call [method@Gio.Socket.set_option] after constructing a GSocket to enable it: ```c socket = g_socket_new (…, G_SOCKET_TYPE_STREAM, …); if (socket != NULL) { g_socket_set_option (socket, IPPROTO_TCP, TCP_NODELAY, FALSE, &local_error); // handle error if needed }


#### Members
- **handleObj**
- **lib**
- **retainedCallbacks**
- **signalHandlerNames**
- **signalSetterHandlers**

#### Methods

- **Socket** (`family = null, type = null, protocol = null`)

	> Creates a new #GSocket with the defined family, type and protocol. If

	- **@protocol** `is` 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type for the family and type is used. The @protocol is a family and type specific int that specifies what kind of protocol to use. #GSocketProtocol lists several common ones. Many families only support one protocol, and use 0 for this, others support several and using 0 means to use the default protocol for the family and type. The protocol id is passed directly to the operating system, so you can use protocols not listed in #GSocketProtocol if you know the protocol number used for it.
	- **@p** `family` is the socket family to use, e.g. %G_SOCKET_FAMILY_IPV4..
	- **@p** `type` is the socket type to use..
	- **@p** `protocol` is the id of the protocol to use, or 0 for default..


- **toNativeHandle** (`Source`)

	> Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from `fn.call(...)`, another generated wrapper exposing `handle()`, or null. Returns null when the argument carries no pointer.

	- **@p** `Source` is the raw handle, raw buffer, wrapper, or null.
	- **@r** `A` raw pointer carrier or null when no pointer is present.


- **getLib** ()

	> Returns the opened native library for this generated wrapper.

	- **@r** `The` opened native library.


- **handle** ()

	> Returns the wrapped NativeHandle.

	- **@r** `The` wrapped NativeHandle.


- **isNull** ()

	> Returns true when the wrapped handle is null.

	- **@r** `A` bool.


- **describe** ()

	> Returns a small string for debugging generated wrappers.

	- **@r** `A` string.


- **asObject** ()

	> Wraps this handle as `Object`.

	- **@r** `A` `Object` object.


- **asDatagramBased** ()

	> Wraps this handle as `DatagramBased`.

	- **@r** `A` `DatagramBased` object.


- **asInitable** ()

	> Wraps this handle as `Initable`.

	- **@r** `A` `Initable` object.


- **getProperty** (`string Name`)

	> Reads one generated property by name.



- **setProperty** (`string Name, Value`)

	> Writes one generated property by name.



- **setBlocking** (`bool Value`)

	> Whether I/O on this socket is blocking.

	- **@p** `Value` is the new property value.
	- **@r** `None.` 


- **setBroadcast** (`bool Value`)

	> Whether the socket should allow sending to broadcast addresses.

	- **@p** `Value` is the new property value.
	- **@r** `None.` 


- **setKeepalive** (`bool Value`)

	> Whether to keep the connection alive by sending periodic pings.

	- **@p** `Value` is the new property value.
	- **@r** `None.` 


- **setListenbacklog** (`int Value`)

	> The number of outstanding connections in the listen queue.

	- **@p** `Value` is the new property value.
	- **@r** `None.` 


- **setMulticastloopback** (`bool Value`)

	> Whether outgoing multicast packets loop back to the local host.

	- **@p** `Value` is the new property value.
	- **@r** `None.` 


- **setMulticastttl** (`int Value`)

	> Time-to-live out outgoing multicast packets

	- **@p** `Value` is the new property value.
	- **@r** `None.` 


- **setTimeout** (`int Value`)

	> The timeout in seconds on socket I/O

	- **@p** `Value` is the new property value.
	- **@r** `None.` 


- **setTtl** (`int Value`)

	> Time-to-live for outgoing unicast packets

	- **@p** `Value` is the new property value.
	- **@r** `None.` 


- **accept** (`object cancellable`)

	> Accept incoming connections on a connection-based socket. This removes the first outstanding connection request from the listening socket and creates a #GSocket object for it. The @socket must be bound to a local address with g_socket_bind() and must be listening for incoming connections (g_socket_listen()). If there are no outstanding connections then the operation will block or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled. To be notified of an incoming connection, wait for the %G_IO_IN condition.

	- **@p** `cancellable` is a %GCancellable or %NULL.


- **bind** (`object address, bool allow_reuse`)

	> When a socket is created it is attached to an address family, but it doesn't have an address in this family. g_socket_bind() assigns the address (sometimes called name) of the socket. It is generally required to bind to a local address before you can receive connections. (See g_socket_listen() and g_socket_accept() ). In certain situations, you may also want to bind a socket that will be used to initiate connections, though this is not normally required. If @socket is a TCP socket, then

	- **@allow_reuse** `controls` the setting of the `SO_REUSEADDR` socket option; normally it should be %TRUE for server sockets (sockets that you will eventually call g_socket_accept() on), and %FALSE for client sockets. (Failing to set this flag on a server socket may cause g_socket_bind() to return %G_IO_ERROR_ADDRESS_IN_USE if the server program is stopped and then immediately restarted.) If @socket is a UDP socket, then
	- **@allow_reuse** `determines` whether or not other UDP sockets can be bound to the same address at the same time. In particular, you can have several UDP sockets bound to the same address, and they will all receive all of the multicast and broadcast packets sent to that address. (The behavior of unicast UDP packets to an address with multiple listeners is not defined.)
	- **@p** `address` is a #GSocketAddress specifying the local address..
	- **@p** `allow_reuse` is whether to allow reusing this address.


- **check\_connect\_result** ()

	> Checks and resets the pending connect error for the socket. This is used to check for errors when g_socket_connect() is used in non-blocking mode.



- **close** ()

	> Closes the socket, shutting down any active connection. Closing a socket does not wait for all outstanding I/O operations to finish, so the caller should not rely on them to be guaranteed to complete even if the close returns with no error. Once the socket is closed, all other operations will return %G_IO_ERROR_CLOSED. Closing a socket multiple times will not return an error. Sockets will be automatically closed when the last reference is dropped, but you might want to call this function to make sure resources are released as early as possible. Beware that due to the way that TCP works, it is possible for recently-sent data to be lost if either you close a socket while the %G_IO_IN condition is set, or else if the remote connection tries to send something to you after you close the socket but before it has finished reading all of the data you sent. There is no easy generic way to avoid this problem; the easiest fix is to design the network protocol such that the client will never send data "out of turn". Another solution is for the server to half-close the connection by calling g_socket_shutdown() with only the @shutdown_write flag set, and then wait for the client to notice this and close its side of the connection, after which the server can safely call g_socket_close(). (This is what #GTcpConnection does if you call g_tcp_connection_set_graceful_disconnect(). But of course, this only works if the client will close its connection after the server does.)



- **condition\_check** (`string condition`)

	> Checks on the readiness of @socket to perform operations. The operations specified in @condition are checked for and masked against the currently-satisfied conditions on @socket. The result is returned. Note that on Windows, it is possible for an operation to return %G_IO_ERROR_WOULD_BLOCK even immediately after g_socket_condition_check() has claimed that the socket is ready for writing. Rather than calling g_socket_condition_check() and then writing to the socket if it succeeds, it is generally better to simply try writing to the socket right away, and try again later if the initial attempt returns %G_IO_ERROR_WOULD_BLOCK. It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition; these conditions will always be set in the output if they are true. This call never blocks.

	- **@p** `condition` is a #GIOCondition mask to check.


- **condition\_wait** (`string condition, object cancellable`)

	> Waits for @condition to become true on @socket. When the condition is met, %TRUE is returned. If @cancellable is cancelled before the condition is met, or if the socket has a timeout set and it is reached before the condition is met, then %FALSE is returned and @error, if non-%NULL, is set to the appropriate value (%G_IO_ERROR_CANCELLED or %G_IO_ERROR_TIMED_OUT). See also g_socket_condition_timed_wait().

	- **@p** `condition` is a #GIOCondition mask to wait for.
	- **@p** `cancellable` is a #GCancellable, or %NULL.


- **connect** (`object address, object cancellable`)

	> Connect the socket to the specified remote address. For connection oriented socket this generally means we attempt to make a connection to the @address. For a connection-less socket it sets the default address for g_socket_send() and discards all incoming datagrams from other sources. Generally connection oriented sockets can only connect once, but connection-less sockets can connect multiple times to change the default address. If the connect call needs to do network I/O it will block, unless non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned and the user can be notified of the connection finishing by waiting for the G_IO_OUT condition. The result of the connection must then be checked with g_socket_check_connect_result().

	- **@p** `address` is a #GSocketAddress specifying the remote address..
	- **@p** `cancellable` is a %GCancellable or %NULL.


- **connection\_factory\_create\_connection** ()

	> Creates a #GSocketConnection subclass of the right type for @socket.



- **create\_source** (`string condition, object cancellable`)

	> Creates a #GSource that can be attached to a %GMainContext to monitor for the availability of the specified @condition on the socket. The #GSource keeps a reference to the @socket. The callback on the source is of the #GSocketSourceFunc type. It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these conditions will always be reported output if they are true. @cancellable if not %NULL can be used to cancel the source, which will cause the source to trigger, reporting the current condition (which is likely 0 unless cancellation happened at the same time as a condition change). You can check for this in the callback using g_cancellable_is_cancelled(). If @socket has a timeout set, and it is reached before @condition occurs, the source will then trigger anyway, reporting %G_IO_IN or %G_IO_OUT depending on @condition. However, @socket will have been marked as having had a timeout, and so the next #GSocket I/O method you call will then fail with a %G_IO_ERROR_TIMED_OUT.

	- **@p** `condition` is a #GIOCondition mask to monitor.
	- **@p** `cancellable` is a %GCancellable or %NULL.


- **get\_available\_bytes** ()

	> Get the amount of data pending in the OS input buffer, without blocking. If @socket is a UDP or SCTP socket, this will return the size of just the next packet, even if additional packets are buffered after that one. Note that on Windows, this function is rather inefficient in the UDP case, and so if you know any plausible upper bound on the size of the incoming packet, it is better to just do a g_socket_receive() with a buffer of that size, rather than calling g_socket_get_available_bytes() first and then doing a receive of exactly the right size.



- **get\_blocking** ()

	> Gets the blocking mode of the socket. For details on blocking I/O, see g_socket_set_blocking().



- **get\_broadcast** ()

	> Gets the broadcast setting on @socket; if %TRUE, it is possible to send packets to broadcast addresses.



- **get\_credentials** ()

	> Returns the credentials of the foreign process connected to this socket, if any (e.g. it is only supported for %G_SOCKET_FAMILY_UNIX sockets). If this operation isn't supported on the OS, the method fails with the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented by reading the %SO_PEERCRED option on the underlying socket. This method can be expected to be available on the following platforms: - Linux since GLib 2.26 - OpenBSD since GLib 2.30 - Solaris, Illumos and OpenSolaris since GLib 2.40 - NetBSD since GLib 2.42 - macOS, tvOS, iOS since GLib 2.66 Other ways to obtain credentials from a foreign peer includes the #GUnixCredentialsMessage type and g_unix_connection_send_credentials() / g_unix_connection_receive_credentials() functions.



- **get\_family** ()

	> Gets the socket family of the socket.



- **get\_fd** ()

	> Returns the underlying OS socket object. On unix this is a socket file descriptor, and on Windows this is a Winsock2 SOCKET handle. This may be useful for doing platform specific or otherwise unusual operations on the socket.



- **get\_keepalive** ()

	> Gets the keepalive mode of the socket. For details on this, see g_socket_set_keepalive().



- **get\_listen\_backlog** ()

	> Gets the listen backlog setting of the socket. For details on this, see g_socket_set_listen_backlog().



- **get\_local\_address** ()

	> Try to get the local address of a bound socket. This is only useful if the socket has been bound to a local address, either explicitly or implicitly when connecting.



- **get\_multicast\_loopback** ()

	> Gets the multicast loopback setting on @socket; if %TRUE (the default), outgoing multicast packets will be looped back to multicast listeners on the same host.



- **get\_multicast\_ttl** ()

	> Gets the multicast time-to-live setting on @socket; see g_socket_set_multicast_ttl() for more details.



- **get\_protocol** ()

	> Gets the socket protocol id the socket was created with. In case the protocol is unknown, -1 is returned.



- **get\_remote\_address** ()

	> Try to get the remote address of a connected socket. This is only useful for connection oriented sockets that have been connected.



- **get\_socket\_type** ()

	> Gets the socket type of the socket.



- **get\_timeout** ()

	> Gets the timeout setting of the socket. For details on this, see g_socket_set_timeout().



- **get\_ttl** ()

	> Gets the unicast time-to-live setting on @socket; see g_socket_set_ttl() for more details.



- **is\_closed** ()

	> Checks whether a socket is closed.



- **is\_connected** ()

	> Check whether the socket is connected. This is only useful for connection-oriented sockets. If using g_socket_shutdown(), this function will return %TRUE until the socket has been shut down for reading and writing. If you do a non-blocking connect, this function will not return %TRUE until after you call g_socket_check_connect_result().



- **join\_multicast\_group** (`object group, bool source_specific, string iface`)

	> Registers @socket to receive multicast messages sent to @group. @socket must be a %G_SOCKET_TYPE_DATAGRAM socket, and must have been bound to an appropriate interface and port with g_socket_bind(). If @iface is %NULL, the system will automatically pick an interface to bind to based on

	- **@group.** `If` @source_specific is %TRUE, source-specific multicast as defined in RFC 4604 is used. Note that on older platforms this may fail with a %G_IO_ERROR_NOT_SUPPORTED error. To bind to a given source-specific multicast address, use g_socket_join_multicast_group_ssm() instead.
	- **@p** `group` is a #GInetAddress specifying the group address to join..
	- **@p** `source_specific` is %TRUE if source-specific multicast should be used.
	- **@p** `iface` is Name of the interface to use, or %NULL.


- **join\_multicast\_group\_ssm** (`object group, object source_specific, string iface`)

	> Registers @socket to receive multicast messages sent to @group. @socket must be a %G_SOCKET_TYPE_DATAGRAM socket, and must have been bound to an appropriate interface and port with g_socket_bind(). If @iface is %NULL, the system will automatically pick an interface to bind to based on

	- **@group.** `If` @source_specific is not %NULL, use source-specific multicast as defined in RFC 4604. Note that on older platforms this may fail with a %G_IO_ERROR_NOT_SUPPORTED error. Note that this function can be called multiple times for the same @group with different @source_specific in order to receive multicast packets from more than one source.
	- **@p** `group` is a #GInetAddress specifying the group address to join..
	- **@p** `source_specific` is a #GInetAddress specifying the source-specific multicast address or %NULL to ignore..
	- **@p** `iface` is Name of the interface to use, or %NULL.


- **leave\_multicast\_group** (`object group, bool source_specific, string iface`)

	> Removes @socket from the multicast group defined by @group, @iface, and

	- **@source_specific** `(which` must all have the same values they had when you joined the group). @socket remains bound to its address and port, and can still receive unicast messages after calling this. To unbind to a given source-specific multicast address, use g_socket_leave_multicast_group_ssm() instead.
	- **@p** `group` is a #GInetAddress specifying the group address to leave..
	- **@p** `source_specific` is %TRUE if source-specific multicast was used.
	- **@p** `iface` is Interface used.


- **leave\_multicast\_group\_ssm** (`object group, object source_specific, string iface`)

	> Removes @socket from the multicast group defined by @group, @iface, and

	- **@source_specific** `(which` must all have the same values they had when you joined the group). @socket remains bound to its address and port, and can still receive unicast messages after calling this.
	- **@p** `group` is a #GInetAddress specifying the group address to leave..
	- **@p** `source_specific` is a #GInetAddress specifying the source-specific multicast address or %NULL to ignore..
	- **@p** `iface` is Name of the interface to use, or %NULL.


- **listen** ()

	> Marks the socket as a server socket, i.e. a socket that is used to accept incoming requests using g_socket_accept(). Before calling this the socket must be bound to a local address using g_socket_bind(). To set the maximum amount of outstanding clients, use g_socket_set_listen_backlog().



- **set\_blocking** (`bool blocking`)

	> Sets the blocking mode of the socket. In blocking mode all operations (which don’t take an explicit blocking parameter) block until they succeed or there is an error. In non-blocking mode all functions return results immediately or with a %G_IO_ERROR_WOULD_BLOCK error. All sockets are created in blocking mode. However, note that the platform level socket is always non-blocking, and blocking mode is a GSocket level feature.

	- **@p** `blocking` is Whether to use blocking I/O or not..
	- **@r** `None.` 


- **set\_broadcast** (`bool broadcast`)

	> Sets whether @socket should allow sending to broadcast addresses. This is %FALSE by default.

	- **@p** `broadcast` is whether @socket should allow sending to broadcast addresses.
	- **@r** `None.` 


- **set\_keepalive** (`bool keepalive`)

	> Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When this flag is set on a socket, the system will attempt to verify that the remote socket endpoint is still present if a sufficiently long period of time passes with no data being exchanged. If the system is unable to verify the presence of the remote endpoint, it will automatically close the connection. This option is only functional on certain kinds of sockets. (Notably, %G_SOCKET_PROTOCOL_TCP sockets.) The exact time between pings is system- and protocol-dependent, but will normally be at least two hours. Most commonly, you would set this flag on a server socket if you want to allow clients to remain idle for long periods of time, but also want to ensure that connections are eventually garbage-collected if clients crash or become unreachable.

	- **@p** `keepalive` is Value for the keepalive flag.
	- **@r** `None.` 


- **set\_listen\_backlog** (`int backlog`)

	> Sets the maximum number of outstanding connections allowed when listening on this socket. If more clients than this are connecting to the socket and the application is not handling them on time then the new connections will be refused. Note that this must be called before g_socket_listen() and has no effect if called after that.

	- **@p** `backlog` is the maximum number of pending connections..
	- **@r** `None.` 


- **set\_multicast\_loopback** (`bool loopback`)

	> Sets whether outgoing multicast packets will be received by sockets listening on that multicast address on the same host. This is %TRUE by default.

	- **@p** `loopback` is whether @socket should receive messages sent to its multicast groups from the local host.
	- **@r** `None.` 


- **set\_multicast\_ttl** (`int ttl`)

	> Sets the time-to-live for outgoing multicast datagrams on @socket. By default, this is 1, meaning that multicast packets will not leave the local network.

	- **@p** `ttl` is the time-to-live value for all multicast datagrams on @socket.
	- **@r** `None.` 


- **set\_option** (`int level, int optname, int value`)

	> Sets the value of an integer-valued option on @socket, as with setsockopt(). (If you need to set a non-integer-valued option, you will need to call setsockopt() directly.) The [`<gio/gnetworking.h>`](networking.html) header pulls in system headers that will define most of the standard/portable socket options. For unusual socket protocols or platform-dependent options, you may need to include additional headers.

	- **@p** `level` is the "API level" of the option (eg, `SOL_SOCKET`).
	- **@p** `optname` is the "name" of the option (eg, `SO_BROADCAST`).
	- **@p** `value` is the value to set the option to.


- **set\_timeout** (`int timeout`)

	> Sets the time in seconds after which I/O operations on @socket will time out if they have not yet completed. On a blocking socket, this means that any blocking #GSocket operation will time out after @timeout seconds of inactivity, returning %G_IO_ERROR_TIMED_OUT. On a non-blocking socket, calls to g_socket_condition_wait() will also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources created with g_socket_create_source() will trigger after @timeout seconds of inactivity, with the requested condition set, at which point calling g_socket_receive(), g_socket_send(), g_socket_check_connect_result(), etc, will fail with %G_IO_ERROR_TIMED_OUT. If @timeout is 0 (the default), operations will never time out on their own. Note that if an I/O operation is interrupted by a signal, this may cause the timeout to be reset.

	- **@p** `timeout` is the timeout for @socket, in seconds, or 0 for none.
	- **@r** `None.` 


- **set\_ttl** (`int ttl`)

	> Sets the time-to-live for outgoing unicast packets on @socket. By default the platform-specific default value is used.

	- **@p** `ttl` is the time-to-live value for all unicast packets on @socket.
	- **@r** `None.` 


- **shutdown** (`bool shutdown_read, bool shutdown_write`)

	> Shut down part or all of a full-duplex connection. If @shutdown_read is %TRUE then the receiving side of the connection is shut down, and further reading is disallowed. If @shutdown_write is %TRUE then the sending side of the connection is shut down, and further writing is disallowed. It is allowed for both @shutdown_read and @shutdown_write to be %TRUE. One example where it is useful to shut down only one side of a connection is graceful disconnect for TCP connections where you close the sending side, then wait for the other side to close the connection, thus ensuring that the other side saw all sent data.

	- **@p** `shutdown_read` is whether to shut down the read side.
	- **@p** `shutdown_write` is whether to shut down the write side.


- **speaks\_ipv4** ()

	> Checks if a socket is capable of speaking IPv4. IPv4 sockets are capable of speaking IPv4. On some operating systems and under some combinations of circumstances IPv6 sockets are also capable of speaking IPv4. See RFC 3493 section 3.7 for more information. No other types of sockets are currently considered as being capable of speaking IPv4.





## class: SocketMeta

[990:14] `static` **extends: object** 

Generated metadata helpers for `Socket` class surfaces.

#### Methods

- **properties** ()

	> Returns property metadata for `Socket`.

	- **@r** `A` list.