Skip to main content

Sockets (xtd.core)

The xtd::net::sockets namespace contains a cross-platform socket networking implementation. All other network-access classes in the xtd::net namespace are built on top of this implementation of sockets.

The socket class is a cross-platform version of the socket services provided relying on native interoperability with Linux, macOS, or Windows. In most cases, the socket class methods simply marshal data into their native counterparts and handle any necessary security checks.

The socket class supports two basic modes, synchronous and asynchronous. In synchronous mode, calls to functions that perform network operations (such as send_async and receive_async) wait until the operation completes before returning control to the calling program. In asynchronous mode, these calls return immediately.

See also