diff options
| author | Lucian Copeland <hierophect@gmail.com> | 2020-12-14 12:57:39 -0500 |
|---|---|---|
| committer | Lucian Copeland <hierophect@gmail.com> | 2020-12-20 17:12:03 -0500 |
| commit | 32736dd2c33430d934878f4bbce0a04b48ca22ac (patch) | |
| tree | e645df1de62b113e0598abaebc47209d8b80e519 /shared-bindings/socketpool/Socket.h | |
| parent | fd21ff59d996274f7c11e3b907dd81eff411d0b3 (diff) | |
Implement server API
Diffstat (limited to 'shared-bindings/socketpool/Socket.h')
| -rw-r--r-- | shared-bindings/socketpool/Socket.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/shared-bindings/socketpool/Socket.h b/shared-bindings/socketpool/Socket.h index 54fbe59b2..e2ea32d39 100644 --- a/shared-bindings/socketpool/Socket.h +++ b/shared-bindings/socketpool/Socket.h @@ -32,6 +32,11 @@ extern const mp_obj_type_t socketpool_socket_type; void common_hal_socketpool_socket_settimeout(socketpool_socket_obj_t* self, mp_uint_t timeout_ms); + +bool common_hal_socketpool_socket_bind(socketpool_socket_obj_t* self, const char* host, size_t hostlen, uint8_t port); +bool common_hal_socketpool_socket_listen(socketpool_socket_obj_t* self, int backlog); +int common_hal_socketpool_socket_accept(socketpool_socket_obj_t* self, uint8_t* ip, uint *port); + bool common_hal_socketpool_socket_connect(socketpool_socket_obj_t* self, const char* host, size_t hostlen, mp_int_t port); mp_uint_t common_hal_socketpool_socket_send(socketpool_socket_obj_t* self, const uint8_t* buf, mp_uint_t len); mp_uint_t common_hal_socketpool_socket_recv_into(socketpool_socket_obj_t* self, const uint8_t* buf, mp_uint_t len); |
