_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

mdns.h
Go to the documentation of this file.
1 // _________ __ __
2 // / _____// |_____________ _/ |______ ____ __ __ ______
3 // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
4 // / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ |
5 // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
6 // \/ \/ \//_____/ \/
7 // ______________________ ______________________
8 // T H E W A R B E G I N S
9 // Stratagus - A free fantasy real time strategy game engine
10 //
12 //
13 // (c) Copyright 2020 by Tim Felgentreff
14 //
15 // This package is free software; you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation; either version 2 of the License, or
18 // (at your option) any later version.
19 //
20 // This program is distributed in the hope that it will be useful,
21 // but WITHOUT ANY WARRANTY; without even the implied warranty of
22 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 // GNU General Public License for more details.
24 //
25 // You should have received a copy of the GNU General Public License
26 // along with this program; if not, write to the Free Software
27 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
28 // 02111-1307, USA.
29 //
30 
31 #include <functional>
32 
33 #include "network/mdns.h"
34 
35 class MDNS {
36 public:
37  MDNS() : serviceSocket(-1), queryId(-1), numSockets(-1) { };
38  ~MDNS();
39 
40  void AnswerServerQueries();
41  void QueryServers(std::function<void(char*)> callback);
42 
43 private:
44  int serviceSocket;
45  int queryId;
46  int querySockets[20];
47  int numSockets;
48 };
MDNS::AnswerServerQueries
void AnswerServerQueries()
Definition: mdns.cpp:65
MDNS
Definition: mdns.h:35
MDNS::QueryServers
void QueryServers(std::function< void(char *)> callback)
Definition: mdns.cpp:102
MDNS::~MDNS
~MDNS()
Definition: mdns.cpp:130
mdns.h
MDNS::MDNS
MDNS()
Definition: mdns.h:37
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.