1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
lokinet/include/lokinet/lokinet_socket.h
2021-06-08 08:32:52 -04:00

23 lines
480 B
C

#pragma once
#include "lokinet_context.h"
#include "lokinet_os.h"
#ifdef __cplusplus
extern "C"
{
#endif
/// poll many sockets for activity
/// each pollfd.fd should be set to the socket id
/// returns 0 on sucess
int EXPORT
lokinet_poll(struct pollfd* poll, nfds_t numsockets, struct lokinet_context* ctx);
/// close a udp socket or a stream socket by its id
void EXPORT
lokinet_close_socket(int id, struct lokinet_context* ctx);
#ifdef __cplusplus
}
#endif