Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LARN
PRRT
Commits
6faf8f8d
Commit
6faf8f8d
authored
Mar 14, 2016
by
Andreas Schmidt
Browse files
Update python bindings.
parent
fd2df983
Pipeline
#84
failed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/cython/cprrt.pxd
View file @
6faf8f8d
...
...
@@ -121,7 +121,8 @@ cdef extern from "prrt/socket.h":
ctypedef
prrtSocket
PrrtSocket
cdef
PrrtSocket
*
PrrtSocket_create
(
uint16_t
port
,
uint8_t
is_sender
)
cdef
PrrtSocket
*
PrrtSocket_create
(
bint
is_sender
)
bint
PrrtSocket_bind
(
PrrtSocket
*
sock_ptr
,
const_char
*
ipAddress
,
const
uint16_t
port
)
int
PrrtSocket_close
(
const
PrrtSocket
*
sock_ptr
)
int
PrrtSocket_connect
(
PrrtSocket
*
sock_ptr
,
const_char
*
host
,
const
uint16_t
port
)
int
PrrtSocket_send
(
PrrtSocket
*
sock_ptr
,
const
uint8_t
*
data
,
const
size_t
data_len
)
...
...
src/cython/prrt.pyx
View file @
6faf8f8d
...
...
@@ -65,7 +65,8 @@ cdef class PrrtSocket:
cdef
bint
isSender
def
__cinit__
(
self
,
port
,
isSender
):
self
.
_c_socket
=
cprrt
.
PrrtSocket_create
(
port
,
isSender
)
self
.
_c_socket
=
cprrt
.
PrrtSocket_create
(
isSender
)
cprrt
.
PrrtSocket_bind
(
self
.
_c_socket
,
"0.0.0.0"
,
port
)
self
.
isSender
=
isSender
def
recv
(
self
):
...
...
Write
Preview
Supports
Markdown
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