dcrud  0.0.0
Distributed data and services
 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 
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 }
InetSocketAddress(const std::string &host, unsigned short port)
bool operator<(const io::InetSocketAddress &left, const io::InetSocketAddress &right)