package vendor:sdl2/net

⌘K
Ctrl+K
or
/

    Types

    GenericSocket ¶

    GenericSocket :: ^struct {
    	ready: i32,
    }
     

    Any network socket can be safely cast to this socket type

    Related Procedures With Parameters

    IPaddress ¶

    IPaddress :: struct {
    	host: u32,
    	port: u16,
    }

    Related Procedures With Parameters

    Related Procedures With Returns

    TCPsocket ¶

    TCPsocket :: distinct rawptr

    Related Procedures With Parameters

    UDPpacket ¶

    UDPpacket :: struct {
    	channel: i32,
    	// The src/dst channel of the packet 
    	data:    [^]u8,
    	// The packet data 
    	len:     i32,
    	// The length of the packet data 
    	maxlen:  i32,
    	// The size of the data buffer 
    	status:  i32,
    	// packet status after sending 
    	address: IPaddress,
    }

    Related Procedures With Parameters

    bool ¶

    bool :: sdl2.bool

    Constants

    INADDR_ANY ¶

    INADDR_ANY :: 0x00000000

    INADDR_BROADCAST ¶

    INADDR_BROADCAST :: 0xFFFFFFFF

    INADDR_LOOPBACK ¶

    INADDR_LOOPBACK :: 0x7f000001

    INADDR_NONE ¶

    INADDR_NONE :: 0xFFFFFFFF

    MAX_UDPADDRESSES ¶

    MAX_UDPADDRESSES :: 4
     

    The maximum addresses bound to a single UDP socket channel

    MAX_UDPCHANNELS ¶

    MAX_UDPCHANNELS :: 32
     

    The maximum channels on a a UDP socket

    Variables

    This section is empty.

    Procedures

    AddSocket ¶

    AddSocket :: proc "c" (set: SocketSet, sock: ^struct {ready: i32,}) -> i32 ---

    AllocPacketSlice ¶

    AllocPacketSlice :: proc "c" (howmany: i32, size: i32) -> []^UDPpacket {…}

    AllocPacketV ¶

    AllocPacketV :: proc "c" (howmany: i32, size: i32) -> [^]^UDPpacket ---

    DelSocket ¶

    DelSocket :: proc "c" (set: SocketSet, sock: ^struct {ready: i32,}) -> i32 ---

    FreePacketSlice ¶

    FreePacketSlice :: proc "c" (packets: []^UDPpacket) {…}

    GetLocalAddresses ¶

    GetLocalAddresses :: proc "c" (addresses: ^IPaddress, maxcount: i32) -> i32 ---

    Read16 ¶

    Read16 :: proc "c" (areap: rawptr) -> u16 {…}
     

    Read a 16/32-bit value from network packet buffer

    Read32 ¶

    Read32 :: proc "c" (areap: rawptr) -> u32 {…}

    ResizePacket ¶

    ResizePacket :: proc "c" (packet: ^UDPpacket, newsize: i32) -> i32 ---

    ResolveHost ¶

    ResolveHost :: proc "c" (address: ^IPaddress, host: cstring, port: u16) -> i32 ---

    SocketReady ¶

    SocketReady :: proc "c" (sock: rawptr) -> sdl2.bool {…}

    TCP_AddSocket ¶

    TCP_AddSocket :: proc "c" (set: SocketSet, sock: TCPsocket) -> i32 {…}

    TCP_DelSocket ¶

    TCP_DelSocket :: proc "c" (set: SocketSet, sock: TCPsocket) -> i32 {…}

    TCP_Recv ¶

    TCP_Recv :: proc "c" (sock: TCPsocket, data: rawptr, maxlen: i32) -> i32 ---

    UDP_AddSocket ¶

    UDP_AddSocket :: proc "c" (set: SocketSet, sock: UDPsocket) -> i32 {…}

    UDP_Bind ¶

    UDP_Bind :: proc "c" (sock: UDPsocket, channel: i32, address: ^IPaddress) -> i32 ---

    UDP_DelSocket ¶

    UDP_DelSocket :: proc "c" (set: SocketSet, sock: UDPsocket) -> i32 {…}

    UDP_Send ¶

    UDP_Send :: proc "c" (sock: UDPsocket, channel: i32, packet: ^UDPpacket) -> i32 ---

    UDP_SendSlice ¶

    UDP_SendSlice :: proc "c" (sock: UDPsocket, packets: []^UDPpacket) -> i32 {…}

    UDP_SendV ¶

    UDP_SendV :: proc "c" (sock: UDPsocket, packets: [^]^UDPpacket, npackets: i32) -> i32 ---

    Write16 ¶

    Write16 :: proc "c" (value: u16, areap: rawptr) {…}
     

    Write a 16/32-bit value to network packet buffer

    Write32 ¶

    Write32 :: proc "c" (value: u32, areap: rawptr) {…}

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-2026-10 (vendor "odin") Windows_amd64 @ 2026-10-12 23:22:57.846843600 +0000 UTC