Commit 6faf8f8d authored by Andreas Schmidt's avatar Andreas Schmidt

Update python bindings.

parent fd2df983
Pipeline #84 failed with stage
......@@ -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)
......
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment