dcrud
0.0.0
Distributed data and services
Main Page
Namespaces
Data Structures
Files
File List
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
InetSocketAddress.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <string>
4
5
namespace
io {
6
7
struct
InetSocketAddress
{
8
9
std::string
_inetAddress
;
10
unsigned
short
_port
;
11
12
InetSocketAddress
(
const
std::string & host,
unsigned
short
port ) :
13
_inetAddress
( host ),
14
_port
( port )
15
{}
16
};
17
18
inline
bool
operator <
(
const
io::InetSocketAddress
& left,
const
io::InetSocketAddress
& right ) {
19
bool
lt = left.
_inetAddress
< right.
_inetAddress
;
20
if
( lt ) {
21
return
true
;
22
}
23
bool
gt = left.
_inetAddress
> right.
_inetAddress
;
24
if
( gt ) {
25
return
false
;
26
}
27
lt = left.
_port
< right.
_port
;
28
return
lt;
29
}
30
}
io::InetSocketAddress::InetSocketAddress
InetSocketAddress(const std::string &host, unsigned short port)
Definition:
InetSocketAddress.hpp:12
io::InetSocketAddress
Definition:
InetSocketAddress.hpp:7
io::operator<
bool operator<(const io::InetSocketAddress &left, const io::InetSocketAddress &right)
Definition:
InetSocketAddress.hpp:18
io::InetSocketAddress::_inetAddress
std::string _inetAddress
Definition:
InetSocketAddress.hpp:9
io::InetSocketAddress::_port
unsigned short _port
Definition:
InetSocketAddress.hpp:10
inc
io
InetSocketAddress.hpp
Generated on Sun Jan 10 2016 19:24:09 for dcrud by
1.8.7