Doomseeker
Wadseeker
Download
Tracker
Git
Docs
Main Page
Plugin API
Modules
Classes
Files
File List
src
core
refresher
hostport.h
1
//------------------------------------------------------------------------------
2
// hostport.h
3
//------------------------------------------------------------------------------
4
//
5
// This program is free software; you can redistribute it and/or
6
// modify it under the terms of the GNU General Public License
7
// as published by the Free Software Foundation; either version 2
8
// of the License, or (at your option) any later version.
9
//
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with this program; if not, write to the Free Software
17
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18
// 02110-1301, USA.
19
//
20
//------------------------------------------------------------------------------
21
// Copyright (C) 2017 "Zalewa" <zalewapl@gmail.com>
22
//------------------------------------------------------------------------------
23
#ifndef id769c5e06_8b14_4e1e_b71c_3a1632b446c3
24
#define id769c5e06_8b14_4e1e_b71c_3a1632b446c3
25
26
#include <QHostAddress>
27
28
class
HostPort
29
{
30
public
:
31
QHostAddress host;
32
unsigned
short
port;
33
34
HostPort
()
35
{
36
this->port = 0;
37
}
38
39
HostPort
(
const
QHostAddress &host,
unsigned
short
port)
40
{
41
this->host = host;
42
this->port = port;
43
}
44
45
bool
operator<(
const
HostPort
&other)
const
46
{
47
return
host != other.host ? host.toString() < other.host.toString() : port < other.port;
48
}
49
50
bool
operator==(
const
HostPort
&other)
const
51
{
52
return
host == other.host && port == other.port;
53
}
54
};
55
56
uint qHash(
const
HostPort
&hostPort);
57
58
#endif
HostPort
Definition:
hostport.h:28
Doomseeker © 2009-2024 The Doomseeker Team