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

    IPaddress ¶

    IPaddress :: struct {
    	host: u32,
    	port: u16,
    }
    Related Procedures With Parameters
    Related Procedures With Returns

    SocketSet ¶

    SocketSet :: distinct rawptr
    Related Procedures With Parameters
    Related Procedures With Returns

    TCPsocket ¶

    TCPsocket :: distinct rawptr
    Related Procedures With Parameters
    Related Procedures With Returns

    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
    Related Procedures With Returns

    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

    MAJOR_VERSION ¶

    MAJOR_VERSION :: 2

    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

    MINOR_VERSION ¶

    MINOR_VERSION :: 0

    PATCHLEVEL ¶

    PATCHLEVEL :: 1

    Variables

    This section is empty.

    Procedures

    AddSocket ¶

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

    AllocPacket ¶

    AllocPacket :: proc "c" (size: i32) -> ^UDPpacket ---

    AllocPacketSlice ¶

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

    AllocPacketV ¶

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

    AllocSocketSet ¶

    AllocSocketSet :: proc "c" (maxsockets: i32) -> SocketSet ---

    CheckSockets ¶

    CheckSockets :: proc "c" (set: SocketSet, timeout: u32) -> i32 ---

    DelSocket ¶

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

    FreePacket ¶

    FreePacket :: proc "c" (packet: ^UDPpacket) ---

    FreePacketSlice ¶

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

    FreePacketV ¶

    FreePacketV :: proc "c" (packetV: [^]^UDPpacket) ---

    FreeSocketSet ¶

    FreeSocketSet :: proc "c" (set: SocketSet) ---

    GetError ¶

    GetError :: proc "c" () -> cstring ---

    GetLocalAddresses ¶

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

    Init ¶

    Init :: proc "c" () -> i32 ---

    Linked_Version ¶

    Linked_Version :: proc "c" () -> ^sdl2.version ---

    Quit ¶

    Quit :: proc "c" () ---

    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 ---

    ResolveIP ¶

    ResolveIP :: proc "c" (ip: ^IPaddress) -> cstring ---

    SetError ¶

    SetError :: proc "c" (fmt: cstring, .. args: ..any) ---

    SocketReady ¶

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

    TCP_Accept ¶

    TCP_Accept :: proc "c" (server: TCPsocket) -> TCPsocket ---

    TCP_AddSocket ¶

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

    TCP_Close ¶

    TCP_Close :: proc "c" (sock: TCPsocket) ---

    TCP_DelSocket ¶

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

    TCP_GetPeerAddress ¶

    TCP_GetPeerAddress :: proc "c" (sock: TCPsocket) -> ^IPaddress ---

    TCP_Open ¶

    TCP_Open :: proc "c" (ip: ^IPaddress) -> TCPsocket ---

    TCP_Recv ¶

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

    TCP_Send ¶

    TCP_Send :: proc "c" (sock: TCPsocket, data: rawptr, len: 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_Close ¶

    UDP_Close :: proc "c" (sock: UDPsocket) ---

    UDP_DelSocket ¶

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

    UDP_GetPeerAddress ¶

    UDP_GetPeerAddress :: proc "c" (sock: UDPsocket, channel: i32) -> IPaddress ---

    UDP_Open ¶

    UDP_Open :: proc "c" (port: u16) -> UDPsocket ---

    UDP_Recv ¶

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

    UDP_RecvV ¶

    UDP_RecvV :: proc "c" (sock: UDPsocket, packets: [^]^UDPpacket) -> 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 ---

    UDP_SetPacketLoss ¶

    UDP_SetPacketLoss :: proc "c" (sock: UDPsocket, percent: i32) ---

    UDP_Unbind ¶

    UDP_Unbind :: proc "c" (sock: UDPsocket, channel: 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-2024-12 (vendor "odin") Windows_amd64 @ 2024-12-20 21:10:47.868612000 +0000 UTC