# libsst-net

Cross-platform BSD-style socket abstraction in C.

## API

### Initialization
- `SST_Net_Init()` / `SST_Net_Shutdown()` -- WinSock init on Windows, no-op on POSIX

### Socket operations
- `SST_Net_Socket()` -- create socket (TCP or UDP, IPv4 or IPv6)
- `SST_Net_Bind()`, `SST_Net_Listen()`, `SST_Net_Accept()`, `SST_Net_Connect()`
- `SST_Net_Send()` / `SST_Net_Recv()` -- stream I/O
- `SST_Net_SendTo()` / `SST_Net_RecvFrom()` -- datagram I/O
- `SST_Net_SetNonblock()` -- toggle non-blocking mode
- `SST_Net_GetSockOpt()` / `SST_Net_SetSockOpt()`
- `SST_Net_Close()`

### Address management
- `SST_Net_InitAddress()`, `SST_Net_SetAddressFromString()`
- `SST_Net_GetAddressFamily()`, `SST_Net_GetAddressPort()`
- `SST_Net_AddressCompare()`, `SST_Net_AddressIsLocalhost()`

### I/O multiplexing
- `SST_Net_Select()` -- fd_set-based (via `SST_NetSocketSet`)
- `SST_Net_Poll()` -- poll-based (via `SST_NetPollDescriptorSet`)

### DNS
- `SST_Net_GetAddrInfo()` / `SST_Net_FreeAddrInfo()` -- forward lookup
- `SST_Net_GetNameInfo()` -- reverse lookup

## Platform backends

- **Win32** -- Winsock2, `WSAPoll`, `InetPton`/`InetNtop`
- **POSIX** -- standard BSD sockets, `poll()`, `inet_pton`/`inet_ntop`

All platform-specific error codes map to a unified `SST_NetResult` enum
(40+ codes).
