equal
deleted
inserted
replaced
|
1 cimport libc |
|
2 |
|
3 cdef class sockaddr : |
|
4 """ |
|
5 A network-level socket address |
|
6 |
|
7 >>> sockaddr().family |
|
8 0 |
|
9 >>> sockaddr().port |
|
10 Traceback (most recent call last): |
|
11 ... |
|
12 NotImplementedError |
|
13 >>> sockaddr().getnameinfo() |
|
14 Traceback (most recent call last): |
|
15 ... |
|
16 NotImplementedError |
|
17 """ |
|
18 |
|
19 # address family |
|
20 # XXX: this should be a class constant! It's part of our type safety! |
|
21 cdef readonly libc.sa_family_t family |
|
22 |
|
23 cdef void _init_family (self, libc.sa_family_t family=?) |
|
24 |
|
25 # get the sockaddr/socklen |
|
26 # each of these can be NULL to ignore it |
|
27 cdef int _get_sockaddr (self, libc.sockaddr **sa_ptr, libc.socklen_t *sa_len) except -1 |
|
28 |