From f9ab444cc614db3b2380d02750d142f9b17a8b90 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 2 Dec 2010 18:23:09 +0000 Subject: Register servers with Internet master server. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2181 --- src/net_query.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/net_query.h') diff --git a/src/net_query.h b/src/net_query.h index f682d320..0ed098f1 100644 --- a/src/net_query.h +++ b/src/net_query.h @@ -31,5 +31,9 @@ extern void NET_QueryAddress(char *addr); extern void NET_LANQuery(void); extern net_addr_t *NET_FindLANServer(void); +net_addr_t *NET_Query_ResolveMaster(net_context_t *context); +void NET_Query_AddToMaster(net_addr_t *master_addr); +void NET_Query_MasterResponse(net_packet_t *packet); + #endif /* #ifndef NET_QUERY_H */ -- cgit v1.2.3 From bfbffcf197a5d78e90d463945d12c84d0f7deadf Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 2 Dec 2010 19:26:05 +0000 Subject: Refactor query code and add a -masterquery command line parameter to query the master server. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2182 --- src/net_query.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/net_query.h') diff --git a/src/net_query.h b/src/net_query.h index 0ed098f1..21c89ecb 100644 --- a/src/net_query.h +++ b/src/net_query.h @@ -30,10 +30,11 @@ extern void NET_QueryAddress(char *addr); extern void NET_LANQuery(void); extern net_addr_t *NET_FindLANServer(void); +extern void NET_MasterQuery(void); -net_addr_t *NET_Query_ResolveMaster(net_context_t *context); -void NET_Query_AddToMaster(net_addr_t *master_addr); -void NET_Query_MasterResponse(net_packet_t *packet); +extern net_addr_t *NET_Query_ResolveMaster(net_context_t *context); +extern void NET_Query_AddToMaster(net_addr_t *master_addr); +extern void NET_Query_MasterResponse(net_packet_t *packet); #endif /* #ifndef NET_QUERY_H */ -- cgit v1.2.3 From b11030cbfee0d4d4a46673001992e94abc146c8c Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 2 Dec 2010 20:11:24 +0000 Subject: More refactoring of querying code, to not be specific to the purpose of printing out a list. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2184 --- src/net_query.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/net_query.h') diff --git a/src/net_query.h b/src/net_query.h index 21c89ecb..98931593 100644 --- a/src/net_query.h +++ b/src/net_query.h @@ -27,10 +27,17 @@ #include "net_defs.h" +typedef void (*net_query_callback_t)(net_addr_t *addr, + net_querydata_t *querydata, + void *user_data); + +extern int NET_LANQuery(net_query_callback_t callback, void *user_data); +extern int NET_MasterQuery(net_query_callback_t callback, void *user_data); extern void NET_QueryAddress(char *addr); -extern void NET_LANQuery(void); extern net_addr_t *NET_FindLANServer(void); -extern void NET_MasterQuery(void); + +extern void NET_QueryPrintCallback(net_addr_t *addr, net_querydata_t *data, + void *user_data); extern net_addr_t *NET_Query_ResolveMaster(net_context_t *context); extern void NET_Query_AddToMaster(net_addr_t *master_addr); -- cgit v1.2.3 From 3c57887b0a5352da1c7c4fe7f149c94bb6d70c31 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 4 Dec 2010 20:48:07 +0000 Subject: Add ping time to query output. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2192 --- src/net_query.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/net_query.h') diff --git a/src/net_query.h b/src/net_query.h index 98931593..01e059cb 100644 --- a/src/net_query.h +++ b/src/net_query.h @@ -29,6 +29,7 @@ typedef void (*net_query_callback_t)(net_addr_t *addr, net_querydata_t *querydata, + unsigned int ping_time, void *user_data); extern int NET_LANQuery(net_query_callback_t callback, void *user_data); @@ -37,7 +38,7 @@ extern void NET_QueryAddress(char *addr); extern net_addr_t *NET_FindLANServer(void); extern void NET_QueryPrintCallback(net_addr_t *addr, net_querydata_t *data, - void *user_data); + unsigned int ping_time, void *user_data); extern net_addr_t *NET_Query_ResolveMaster(net_context_t *context); extern void NET_Query_AddToMaster(net_addr_t *master_addr); -- cgit v1.2.3