mirror of
https://github.com/glest/glest-source.git
synced 2025-09-25 23:19:07 +02:00
Added auto-discovery of LAN servers using UDP broadcast. (for now the client must press the A key from the join menu to trigger this)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// ==============================================================
|
||||
// This file is part of Glest Shared Library (www.glest.org)
|
||||
//
|
||||
// Copyright (C) 2001-2008 Marti<EFBFBD>o Figueroa
|
||||
// Copyright (C) 2001-2008 Martio Figueroa
|
||||
//
|
||||
// You can redistribute this code and/or modify it under
|
||||
// the terms of the GNU General Public License as published
|
||||
@@ -101,6 +101,7 @@ public:
|
||||
// =====================================================
|
||||
// Misc
|
||||
// =====================================================
|
||||
void Tokenize(const string& str,vector<string>& tokens,const string& delimiters = " ");
|
||||
bool isdir(const char *path);
|
||||
void findDirs(const vector<string> &paths, vector<string> &results, bool errorOnNotFound=false);
|
||||
void findAll(const vector<string> &paths, const string &fileFilter, vector<string> &results, bool cutExtension=false, bool errorOnNotFound=true);
|
||||
|
@@ -103,10 +103,15 @@ public:
|
||||
// =====================================================
|
||||
|
||||
class ServerSocket: public Socket{
|
||||
|
||||
public:
|
||||
void bind(int port);
|
||||
void listen(int connectionQueueSize= SOMAXCONN);
|
||||
Socket *accept();
|
||||
|
||||
protected:
|
||||
|
||||
void broadcast_thread();
|
||||
};
|
||||
|
||||
}}//end namespace
|
||||
|
Reference in New Issue
Block a user