getting the paraz2 server host and port info from the HTTP request, and mirroring...
[pazpar2-moved-to-github.git] / src / eventl.h
index 199d944..aee2106 100644 (file)
@@ -3,8 +3,8 @@
  * See the file LICENSE for details.
  * Sebastian Hammer, Adam Dickmeiss
  *
- * $Log: eventl.h,v $
- * Revision 1.1  2006-12-20 20:47:16  quinn
+ * $Id: eventl.h,v 1.2 2007-03-28 12:05:18 marc Exp $
+ * Revision 1.1  2006/12/20 20:47:16  quinn
  * Reorganized source tree
  *
  * Revision 1.3  2006/12/12 02:36:24  quinn
 
 #include <time.h>
 
+#ifdef WIN32
+#include <winsock.h>
+#else
+#include <unistd.h>
+#include <arpa/inet.h>
+#endif
+
+
 struct iochan;
 
 typedef void (*IOC_CALLBACK)(struct iochan *i, int event);
@@ -68,6 +76,8 @@ typedef void (*IOC_CALLBACK)(struct iochan *i, int event);
 typedef struct iochan
 {
     int fd;
+    struct sockaddr_in addr_in;
+    char addr_str[64];
     int flags;
 #define EVENT_INPUT     0x01
 #define EVENT_OUTPUT    0x02
@@ -101,7 +111,8 @@ typedef struct iochan
 #define iochan_settimeout(i, t) ((i)->max_idle = (t), (i)->last_event = time(0))
 #define iochan_activity(i) ((i)->last_event = time(0))
 
-IOCHAN iochan_create(int fd, IOC_CALLBACK cb, int flags);
+IOCHAN iochan_create(int fd, struct sockaddr_in * addr_in, 
+                     IOC_CALLBACK cb, int flags);
 int event_loop(IOCHAN *iochans);
 
 #endif