#ifndef cServer_udp_h #include "cSocket.h" #include "cygwin.h" #include class cServer_udp : public cSocket { private: int REQ_file_ping (unsigned char *DATA, size_t LEN); // (0x90) int RES_rang (unsigned char *data, size_t len); // (0x91) int RES_not_found (unsigned char *data, size_t len); // (0x92) int RES_queue_full (unsigned char * , size_t ); // (0x93) int REQ_ping (unsigned char *DATA, size_t LEN); // (0x96) int RES_ping (unsigned char *DATA, size_t LEN); // (0x97) int RES_sources (unsigned char *DATA, size_t LEN); // (0x9B) int REQ_callback (unsigned char *DATA, size_t LEN); // (0x9C) int RES_search (unsigned char *DATA, size_t LEN); int RES_server_lst (unsigned char *DATA, size_t LEN); // (0xA1) int RES_info (unsigned char *DATA, size_t LEN); // (0xA3) bool res_ping (unsigned query, unsigned user, unsigned files); public: bool UDP_next_ping ( ); // (0x96) bool UDP_next_info (in_addr ip, uint16_t port ); // (0xA2) bool UDP_server_lst (in_addr ip, uint16_t port ); // (0xA4) bool UDP_search4gui (const sGui *gui ); // (0x98) bool UDP_req_callback (uint32_t idx ); // (0x9C) bool req_server_list (struct in_addr ip, uint16_t port ); // (0xA4) bool UDP_req_sources (in_addr ip,uint16_t port, const uint8_t *HASH); // (0x9A) int req_file_ping (in_addr ip, uint16_t port, uint8_t *file_hash); // (0x90) public: cServer_udp (unsigned short PORT) : cSocket(PORT, SOCK_DGRAM) { Type = tServerUDP; } virtual int doRead_high (void); virtual void Work (void) { doRead_high(); } }; #endif