From 437dd83fc8dc7777392c3047b4a686fec597ae98 Mon Sep 17 00:00:00 2001 From: Stephen-Seo Date: Fri, 12 Jan 2024 04:34:52 +0000 Subject: [PATCH] deploy: 02651c793eb848faf18751fdf40de0bcbb6db9f4 --- UDPC_8h.html | 1 + UDPC_8h_source.html | 232 ++++++++++++++++++++++---------------------- 2 files changed, 117 insertions(+), 116 deletions(-) diff --git a/UDPC_8h.html b/UDPC_8h.html index 129ced5..de9fb13 100644 --- a/UDPC_8h.html +++ b/UDPC_8h.html @@ -1451,6 +1451,7 @@ Variables

UDPC_is_valid_context() may be used to check if the context was successfully created.

Warning
The received UDPC_HContext must be freed with a call to UDPC_destroy().
+
Note
This function creates a context that does not use a separate thread to call update periodically. You must call UDPC_update() periodically, enable threaded update with UDPC_enable_threaded_update or UDPC_enable_threaded_update_ms, or use UDPC_init_threaded_update or UDPC_init_threaded_update_ms instead of UDPC_init .
Returns
A UDPC context
diff --git a/UDPC_8h_source.html b/UDPC_8h_source.html index f10cdaa..466eee1 100644 --- a/UDPC_8h_source.html +++ b/UDPC_8h_source.html @@ -247,126 +247,126 @@ $(function() {
309
310UDPC_EXPORT UDPC_ConnectionId UDPC_create_id_hostname(const char *hostname, uint16_t port);
311
-
328UDPC_EXPORT UDPC_HContext UDPC_init(UDPC_ConnectionId listenId, int isClient, int isUsingLibsodium);
-
348UDPC_EXPORT UDPC_HContext UDPC_init_threaded_update(
-
349 UDPC_ConnectionId listenId,
-
350 int isClient,
-
351 int isUsingLibsodium);
-
371UDPC_EXPORT UDPC_HContext UDPC_init_threaded_update_ms(
-
372 UDPC_ConnectionId listenId,
-
373 int isClient,
-
374 int updateMS,
-
375 int isUsingLibsodium);
-
376
-
386UDPC_EXPORT int UDPC_enable_threaded_update(UDPC_HContext ctx);
-
397UDPC_EXPORT int UDPC_enable_threaded_update_ms(UDPC_HContext ctx, int updateMS);
-
406UDPC_EXPORT int UDPC_disable_threaded_update(UDPC_HContext ctx);
-
407
-
413UDPC_EXPORT int UDPC_is_valid_context(UDPC_HContext ctx);
-
414
-
424UDPC_EXPORT void UDPC_destroy(UDPC_HContext ctx);
-
425
-
445UDPC_EXPORT void UDPC_update(UDPC_HContext ctx);
-
446
-
457UDPC_EXPORT void UDPC_client_initiate_connection(
-
458 UDPC_HContext ctx,
-
459 UDPC_ConnectionId connectionId,
-
460 int enableLibSodium);
-
461
-
480UDPC_EXPORT void UDPC_queue_send(UDPC_HContext ctx, UDPC_ConnectionId destinationId,
-
481 int isChecked, const void *data, uint32_t size);
-
482
-
499UDPC_EXPORT unsigned long UDPC_get_queue_send_current_size(UDPC_HContext ctx);
-
500
-
517UDPC_EXPORT unsigned long UDPC_get_queued_size(UDPC_HContext ctx, UDPC_ConnectionId id, int *exists);
-
518
-
527UDPC_EXPORT unsigned long UDPC_get_max_queued_size();
-
528
-
535UDPC_EXPORT int UDPC_set_accept_new_connections(UDPC_HContext ctx, int isAccepting);
-
536
-
548UDPC_EXPORT void UDPC_drop_connection(UDPC_HContext ctx, UDPC_ConnectionId connectionId, int dropAllWithAddr);
-
549
-
559UDPC_EXPORT int UDPC_has_connection(UDPC_HContext ctx, UDPC_ConnectionId connectionId);
-
560
-
575UDPC_EXPORT UDPC_ConnectionId* UDPC_get_list_connected(UDPC_HContext ctx, unsigned int *size);
-
576
-
581UDPC_EXPORT void UDPC_free_list_connected(UDPC_ConnectionId *list);
+
334UDPC_EXPORT UDPC_HContext UDPC_init(UDPC_ConnectionId listenId, int isClient, int isUsingLibsodium);
+
354UDPC_EXPORT UDPC_HContext UDPC_init_threaded_update(
+
355 UDPC_ConnectionId listenId,
+
356 int isClient,
+
357 int isUsingLibsodium);
+
377UDPC_EXPORT UDPC_HContext UDPC_init_threaded_update_ms(
+
378 UDPC_ConnectionId listenId,
+
379 int isClient,
+
380 int updateMS,
+
381 int isUsingLibsodium);
+
382
+
392UDPC_EXPORT int UDPC_enable_threaded_update(UDPC_HContext ctx);
+
403UDPC_EXPORT int UDPC_enable_threaded_update_ms(UDPC_HContext ctx, int updateMS);
+
412UDPC_EXPORT int UDPC_disable_threaded_update(UDPC_HContext ctx);
+
413
+
419UDPC_EXPORT int UDPC_is_valid_context(UDPC_HContext ctx);
+
420
+
430UDPC_EXPORT void UDPC_destroy(UDPC_HContext ctx);
+
431
+
451UDPC_EXPORT void UDPC_update(UDPC_HContext ctx);
+
452
+
463UDPC_EXPORT void UDPC_client_initiate_connection(
+
464 UDPC_HContext ctx,
+
465 UDPC_ConnectionId connectionId,
+
466 int enableLibSodium);
+
467
+
486UDPC_EXPORT void UDPC_queue_send(UDPC_HContext ctx, UDPC_ConnectionId destinationId,
+
487 int isChecked, const void *data, uint32_t size);
+
488
+
505UDPC_EXPORT unsigned long UDPC_get_queue_send_current_size(UDPC_HContext ctx);
+
506
+
523UDPC_EXPORT unsigned long UDPC_get_queued_size(UDPC_HContext ctx, UDPC_ConnectionId id, int *exists);
+
524
+
533UDPC_EXPORT unsigned long UDPC_get_max_queued_size();
+
534
+
541UDPC_EXPORT int UDPC_set_accept_new_connections(UDPC_HContext ctx, int isAccepting);
+
542
+
554UDPC_EXPORT void UDPC_drop_connection(UDPC_HContext ctx, UDPC_ConnectionId connectionId, int dropAllWithAddr);
+
555
+
565UDPC_EXPORT int UDPC_has_connection(UDPC_HContext ctx, UDPC_ConnectionId connectionId);
+
566
+
581UDPC_EXPORT UDPC_ConnectionId* UDPC_get_list_connected(UDPC_HContext ctx, unsigned int *size);
582
-
594UDPC_EXPORT uint32_t UDPC_get_protocol_id(UDPC_HContext ctx);
-
595
-
606UDPC_EXPORT uint32_t UDPC_set_protocol_id(UDPC_HContext ctx, uint32_t id);
-
607
-
616UDPC_EXPORT UDPC_LoggingType UDPC_get_logging_type(UDPC_HContext ctx);
-
617
-
627UDPC_EXPORT UDPC_LoggingType UDPC_set_logging_type(UDPC_HContext ctx, UDPC_LoggingType loggingType);
-
628
-
637UDPC_EXPORT int UDPC_get_receiving_events(UDPC_HContext ctx);
-
638
-
648UDPC_EXPORT int UDPC_set_receiving_events(UDPC_HContext ctx, int isReceivingEvents);
-
649
-
661UDPC_EXPORT UDPC_Event UDPC_get_event(UDPC_HContext ctx, unsigned long *remaining);
-
662
-
670UDPC_EXPORT UDPC_PacketInfo UDPC_get_received(UDPC_HContext ctx, unsigned long *remaining);
-
671
-
679UDPC_EXPORT void UDPC_free_PacketInfo(UDPC_PacketInfo pInfo);
-
680
-
696UDPC_EXPORT void UDPC_free_PacketInfo_ptr(UDPC_PacketInfo *pInfoPtr);
-
697
-
715UDPC_EXPORT int UDPC_set_libsodium_keys(UDPC_HContext ctx, const unsigned char *sk, const unsigned char *pk);
-
716
-
730UDPC_EXPORT int UDPC_set_libsodium_key_easy(UDPC_HContext ctx, const unsigned char *sk);
-
731
-
740UDPC_EXPORT int UDPC_unset_libsodium_keys(UDPC_HContext ctx);
-
741
-
757UDPC_EXPORT int UDPC_add_whitelist_pk(UDPC_HContext ctx, const unsigned char *pk);
-
758
-
767UDPC_EXPORT int UDPC_has_whitelist_pk(UDPC_HContext ctx, const unsigned char *pk);
-
768
-
777UDPC_EXPORT int UDPC_remove_whitelist_pk(UDPC_HContext ctx, const unsigned char *pk);
-
778
-
793UDPC_EXPORT int UDPC_clear_whitelist(UDPC_HContext ctx);
-
794
-
809UDPC_EXPORT int UDPC_get_auth_policy(UDPC_HContext ctx);
-
810
-
825UDPC_EXPORT int UDPC_set_auth_policy(UDPC_HContext ctx, int value);
-
826
-
831UDPC_EXPORT const char *UDPC_atostr_cid(UDPC_HContext ctx, UDPC_ConnectionId connectionId);
+
587UDPC_EXPORT void UDPC_free_list_connected(UDPC_ConnectionId *list);
+
588
+
600UDPC_EXPORT uint32_t UDPC_get_protocol_id(UDPC_HContext ctx);
+
601
+
612UDPC_EXPORT uint32_t UDPC_set_protocol_id(UDPC_HContext ctx, uint32_t id);
+
613
+
622UDPC_EXPORT UDPC_LoggingType UDPC_get_logging_type(UDPC_HContext ctx);
+
623
+
633UDPC_EXPORT UDPC_LoggingType UDPC_set_logging_type(UDPC_HContext ctx, UDPC_LoggingType loggingType);
+
634
+
643UDPC_EXPORT int UDPC_get_receiving_events(UDPC_HContext ctx);
+
644
+
654UDPC_EXPORT int UDPC_set_receiving_events(UDPC_HContext ctx, int isReceivingEvents);
+
655
+
667UDPC_EXPORT UDPC_Event UDPC_get_event(UDPC_HContext ctx, unsigned long *remaining);
+
668
+
676UDPC_EXPORT UDPC_PacketInfo UDPC_get_received(UDPC_HContext ctx, unsigned long *remaining);
+
677
+
685UDPC_EXPORT void UDPC_free_PacketInfo(UDPC_PacketInfo pInfo);
+
686
+
702UDPC_EXPORT void UDPC_free_PacketInfo_ptr(UDPC_PacketInfo *pInfoPtr);
+
703
+
721UDPC_EXPORT int UDPC_set_libsodium_keys(UDPC_HContext ctx, const unsigned char *sk, const unsigned char *pk);
+
722
+
736UDPC_EXPORT int UDPC_set_libsodium_key_easy(UDPC_HContext ctx, const unsigned char *sk);
+
737
+
746UDPC_EXPORT int UDPC_unset_libsodium_keys(UDPC_HContext ctx);
+
747
+
763UDPC_EXPORT int UDPC_add_whitelist_pk(UDPC_HContext ctx, const unsigned char *pk);
+
764
+
773UDPC_EXPORT int UDPC_has_whitelist_pk(UDPC_HContext ctx, const unsigned char *pk);
+
774
+
783UDPC_EXPORT int UDPC_remove_whitelist_pk(UDPC_HContext ctx, const unsigned char *pk);
+
784
+
799UDPC_EXPORT int UDPC_clear_whitelist(UDPC_HContext ctx);
+
800
+
815UDPC_EXPORT int UDPC_get_auth_policy(UDPC_HContext ctx);
+
816
+
831UDPC_EXPORT int UDPC_set_auth_policy(UDPC_HContext ctx, int value);
832
-
862UDPC_EXPORT const char *UDPC_atostr(UDPC_HContext ctx, UDPC_IPV6_ADDR_TYPE addr);
-
863
-
878UDPC_EXPORT const char *UDPC_atostr_unsafe(UDPC_IPV6_ADDR_TYPE addr);
-
879
-
892UDPC_EXPORT const char *UDPC_atostr_unsafe_cid(UDPC_ConnectionId cid);
-
893
-
897UDPC_EXPORT void UDPC_atostr_unsafe_free(const char *addrBuf);
-
898
-
910UDPC_EXPORT void UDPC_atostr_unsafe_free_ptr(const char **addrBuf);
-
911
-
912// =============================================================================
-
913// Helpers
-
914
-
916UDPC_EXPORT UDPC_IPV6_ADDR_TYPE UDPC_strtoa(const char *addrStr);
+
837UDPC_EXPORT const char *UDPC_atostr_cid(UDPC_HContext ctx, UDPC_ConnectionId connectionId);
+
838
+
868UDPC_EXPORT const char *UDPC_atostr(UDPC_HContext ctx, UDPC_IPV6_ADDR_TYPE addr);
+
869
+
884UDPC_EXPORT const char *UDPC_atostr_unsafe(UDPC_IPV6_ADDR_TYPE addr);
+
885
+
898UDPC_EXPORT const char *UDPC_atostr_unsafe_cid(UDPC_ConnectionId cid);
+
899
+
903UDPC_EXPORT void UDPC_atostr_unsafe_free(const char *addrBuf);
+
904
+
916UDPC_EXPORT void UDPC_atostr_unsafe_free_ptr(const char **addrBuf);
917
-
918UDPC_EXPORT UDPC_IPV6_ADDR_TYPE UDPC_strtoa_link(const char *addrStr, uint32_t *linkId_out);
-
919
-
920UDPC_EXPORT UDPC_IPV6_ADDR_TYPE UDPC_a4toa6(uint32_t a4_be);
-
921
-
922UDPC_EXPORT int UDPC_is_big_endian();
+
918// =============================================================================
+
919// Helpers
+
920
+
922UDPC_EXPORT UDPC_IPV6_ADDR_TYPE UDPC_strtoa(const char *addrStr);
923
-
964UDPC_EXPORT uint16_t UDPC_no16i(uint16_t i);
-
965
-
1006UDPC_EXPORT uint32_t UDPC_no32i(uint32_t i);
-
1007
-
1048UDPC_EXPORT uint64_t UDPC_no64i(uint64_t i);
-
1049
-
1081UDPC_EXPORT float UDPC_no32f(float f);
-
1082
-
1114UDPC_EXPORT double UDPC_no64f(double f);
-
1115
-
1116#ifdef __cplusplus
-
1117}
-
1118#endif
-
1119#endif
+
924UDPC_EXPORT UDPC_IPV6_ADDR_TYPE UDPC_strtoa_link(const char *addrStr, uint32_t *linkId_out);
+
925
+
926UDPC_EXPORT UDPC_IPV6_ADDR_TYPE UDPC_a4toa6(uint32_t a4_be);
+
927
+
928UDPC_EXPORT int UDPC_is_big_endian();
+
929
+
970UDPC_EXPORT uint16_t UDPC_no16i(uint16_t i);
+
971
+
1012UDPC_EXPORT uint32_t UDPC_no32i(uint32_t i);
+
1013
+
1054UDPC_EXPORT uint64_t UDPC_no64i(uint64_t i);
+
1055
+
1087UDPC_EXPORT float UDPC_no32f(float f);
+
1088
+
1120UDPC_EXPORT double UDPC_no64f(double f);
+
1121
+
1122#ifdef __cplusplus
+
1123}
+
1124#endif
+
1125#endif
UDPC_EXPORT uint32_t UDPC_set_protocol_id(UDPC_HContext ctx, uint32_t id)
Sets the protocol id of the UDPC context.
UDPC_EXPORT uint16_t UDPC_no16i(uint16_t i)
Converts a 16-bit int into/from network byte order (big endian).
UDPC_EXPORT uint64_t UDPC_no64i(uint64_t i)
Converts a 64-bit int into/from network byte order (big endian).
-- 2.49.0