From 767e96e2270b06d6b3dd8b477c5388f4ee7863a7 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Wed, 6 Mar 2019 20:34:24 +0900 Subject: [PATCH] Add more documentation --- src/UDPConnection.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/UDPConnection.h b/src/UDPConnection.h index 0929b58..def82e5 100644 --- a/src/UDPConnection.h +++ b/src/UDPConnection.h @@ -175,21 +175,27 @@ UDPC_Context* UDPC_init(uint16_t listenPort, uint32_t listenAddr, int isClient); */ UDPC_Context* UDPC_init_threaded_update(uint16_t listenPort, uint32_t listenAddr, int isClient); +/// This fn must be called on a UDPC_Context to free resources void UDPC_destroy(UDPC_Context *ctx); void UDPC_INTERNAL_destroy_conMap(void *unused, uint32_t addr, char *data); +/// Sets the callback for connected events void UDPC_set_callback_connected( UDPC_Context *ctx, UDPC_callback_connected fptr, void *userData); +/// Sets the callback for disconnected events void UDPC_set_callback_disconnected( UDPC_Context *ctx, UDPC_callback_disconnected fptr, void *userData); +/// Sets the callback for received packet events void UDPC_set_callback_received( UDPC_Context *ctx, UDPC_callback_received fptr, void *userData); +/// Invokes callbacks based on events that have ocurred during UDPC_update() void UDPC_check_events(UDPC_Context *ctx); +/// Tells UDPC to initiate a connection to a server void UDPC_client_initiate_connection(UDPC_Context *ctx, uint32_t addr, uint16_t port); /*!