Net Module

HttpClient, IPAddress, sockets — networking support.

Component Selection

SurfaceTarget
Common network typesSharpRuntime::Net
SocketsSharpRuntime::Net.Sockets
HTTP, headers, and HTTP JSON extensionsSharpRuntime::Net.Http, SharpRuntime::Net.Http.Headers, SharpRuntime::Net.Http.Json
WebSocketsSharpRuntime::Net.WebSockets
MIME and network informationSharpRuntime::Net.Mime, SharpRuntime::Net.NetworkInformation

System::Net::Http — HttpClient

modules/net-http/include/System/Net/Http/

Status: Partial

⚠ No TLS / HTTPS
The current HttpClient implementation supports plain HTTP only. HTTPS (TLS) is not implemented. Do not use for production HTTPS requests.
ClassHeaderDescription
HttpClientSystem/Net/Http/HttpClient.hppHTTP client (plain HTTP only)
HttpRequestMessageSystem/Net/Http/HttpRequestMessage.hppHTTP request with method, URI, headers, content
HttpResponseMessageSystem/Net/Http/HttpResponseMessage.hppHTTP response with status code, headers, content
HttpContentSystem/Net/Http/HttpContent.hppAbstract base for request/response content
StringContentSystem/Net/Http/StringContent.hppText body content
ByteArrayContentSystem/Net/Http/ByteArrayContent.hppBinary body content
FormUrlEncodedContentSystem/Net/Http/FormUrlEncodedContent.hppURL-encoded form data
HttpMethodSystem/Net/Http/HttpMethod.hppHTTP verb: GET, POST, PUT, DELETE, etc.

System::Net::Sockets — POSIX-only

modules/net-sockets/include/System/Net/Sockets/

⚠ POSIX-only
The System::Net::Sockets namespace currently uses POSIX socket APIs (<sys/socket.h>, <unistd.h>). It works on Linux and macOS. Windows and Emscripten support is a known gap.
ClassHeaderDescription
TcpClientSystem/Net/Sockets/TcpClient.hppTCP client socket wrapper
UdpClientSystem/Net/Sockets/UdpClient.hppUDP client socket wrapper
NetworkStreamSystem/Net/Sockets/NetworkStream.hppStream over a network socket

System::Net — Common Types

TypeHeaderDescription
IPAddressSystem/Net/IPAddress.hppIP address (v4/v6)
IPEndPointSystem/Net/IPEndPoint.hppIP address + port
HttpStatusCodeSystem/Net/HttpStatusCode.hppHTTP status code enum
WebUtilitySystem/Net/WebUtility.hppURL encode/decode utilities