From 9ccaa904393ddf2189f7d7815cef29a3e3393cbc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 28 Aug 2011 17:29:09 +0200 Subject: ntp_server: use the I/O thread --- src/ntp_server.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/ntp_server.h') diff --git a/src/ntp_server.h b/src/ntp_server.h index 56593fef0..2b970dff2 100644 --- a/src/ntp_server.h +++ b/src/ntp_server.h @@ -20,6 +20,8 @@ #ifndef MPD_NTP_SERVER_H #define MPD_NTP_SERVER_H +#include + #include struct timeval; @@ -27,24 +29,18 @@ struct timeval; struct ntp_server { unsigned short port; int fd; + + GIOChannel *channel; + GSource *source; }; void ntp_server_init(struct ntp_server *ntp); void -ntp_server_close(struct ntp_server *ntp); - -/* - * Recv the NTP datagram from the AirTunes, send back an NTP response. - */ -bool -ntp_server_handle(struct ntp_server *ntp); +ntp_server_open(struct ntp_server *ntp, int fd); -/* - * check to see if there are any timing requests, and respond if there are any - */ -bool -ntp_server_check(struct ntp_server *ntp, struct timeval *tout); +void +ntp_server_close(struct ntp_server *ntp); #endif -- cgit v1.2.3