Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
http-server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefane Fermigier
http-server
Commits
7ea35116
Commit
7ea35116
authored
Oct 31, 2021
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add getaddrinfo.pyx demo
parent
46cb270c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
src/getaddrinfo.pyx
src/getaddrinfo.pyx
+15
-0
No files found.
src/getaddrinfo.pyx
0 → 100644
View file @
7ea35116
from
stdlib.string
cimport
Str
from
stdlib.socket
cimport
getaddrinfo
from
libc.stdio
cimport
printf
,
puts
from
libc.string
cimport
strlen
def
main
():
with
nogil
:
l
=
getaddrinfo
(
NULL
,
Str
(
"3490"
),
0
,
0
,
0
,
0
)
for
a
in
l
:
s
=
a
.
sockaddr
.
to_string
()
printf
(
"%d %d %d %s %s
\
n
"
,
a
.
family
,
a
.
socktype
,
a
.
protocol
,
Str
.
to_c_str
(
a
.
canonname
),
Str
.
to_c_str
(
s
))
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment