nfs4: Add ServerAddress comparators
This commit is contained in:
@@ -25,6 +25,23 @@
|
|||||||
KSOCKET_MODULE_DECL;
|
KSOCKET_MODULE_DECL;
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
ServerAddress::operator==(const ServerAddress& x)
|
||||||
|
{
|
||||||
|
return fAddress == x.fAddress && fPort == x.fPort
|
||||||
|
&& fProtocol == x.fProtocol;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
ServerAddress::operator<(const ServerAddress& x)
|
||||||
|
{
|
||||||
|
return fAddress < x.fAddress ||
|
||||||
|
(fAddress == x.fAddress && fPort < x.fPort) ||
|
||||||
|
(fAddress == x.fAddress && fPort == x.fPort &&
|
||||||
|
fProtocol < x.fProtocol);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Connection::Connection(const sockaddr_in& addr, Transport proto, bool markers)
|
Connection::Connection(const sockaddr_in& addr, Transport proto, bool markers)
|
||||||
:
|
:
|
||||||
fSock(-1),
|
fSock(-1),
|
||||||
|
|||||||
Reference in New Issue
Block a user