sockets.pxd 329 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from libc.stdint cimport uint32_t, uint16_t, uint8_t, int32_t

cdef struct in_addr:
    uint32_t s_addr

ctypedef uint16_t sa_family_t

cdef struct sockaddr:
    sa_family_t sa_family
    char sa_data[14]

cdef struct sockaddr_in:
    sa_family_t sin_family
    unsigned short sin_port
    in_addr sin_addr
    char sa_data[250]