You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
1.1 KiB

/*
* android_udp_log.h — non-blocking UDP log sender for Android
*
* Thread-safe buffer with non-blocking send.
* Flushes at 16KB threshold or 200ms timer.
*/
#ifndef ANDROID_UDP_LOG_H
#define ANDROID_UDP_LOG_H
#ifdef __cplusplus
extern "C" {
#endif
struct UASYNC;
/* Только поток ядра: attach после create, detach перед каждым destroy/restart. */
void udp_log_attach(struct UASYNC* ua);
void udp_log_detach(struct UASYNC* ua);
/* Любой поток. Смена адреса передаёт управление таймером в поток ядра. */
void udp_log_set_target(const char* ip, int port);
/* Write log line to buffer. Non-blocking send if threshold reached.
* Thread-safe — call from any thread (bridge_debug_hook). */
void udp_log_write(const char* data, int len);
/* Любой поток: ошибки отправляем немедленно, до возможной остановки ядра. */
void udp_log_flush(void);
/* Flush buffer, close socket. Call after instance shutdown. */
void udp_log_stop(void);
#ifdef __cplusplus
}
#endif
#endif /* ANDROID_UDP_LOG_H */