blob: 4e6934c3f6c89767e8d76cb1f852dfcd8e287f17 [file] [log] [blame]
Ryan Keane6e542522019-09-10 16:05:44 -07001// Copyright 2019 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
Jordan Baylescea81af2020-10-01 14:59:38 -07003// found in the LICENSE file.
Ryan Keane6e542522019-09-10 16:05:44 -07004
Ryan Keane3b88a252019-09-17 09:55:33 -07005#ifndef PLATFORM_IMPL_SOCKET_HANDLE_H_
6#define PLATFORM_IMPL_SOCKET_HANDLE_H_
Ryan Keane6e542522019-09-10 16:05:44 -07007
Ryan Keanebcc7ba82019-09-20 14:17:59 -07008#include <cstdlib>
9
Ryan Keane6e542522019-09-10 16:05:44 -070010namespace openscreen {
Ryan Keane6e542522019-09-10 16:05:44 -070011
12// A SocketHandle is the handle used to access a Socket by the underlying
13// platform.
14struct SocketHandle;
15
Ryan Keanebcc7ba82019-09-20 14:17:59 -070016struct SocketHandleHash {
17 size_t operator()(const SocketHandle& handle) const;
18};
19
20bool operator==(const SocketHandle& lhs, const SocketHandle& rhs);
21inline bool operator!=(const SocketHandle& lhs, const SocketHandle& rhs) {
22 return !(lhs == rhs);
23}
24
Ryan Keane6e542522019-09-10 16:05:44 -070025} // namespace openscreen
26
Ryan Keane3b88a252019-09-17 09:55:33 -070027#endif // PLATFORM_IMPL_SOCKET_HANDLE_H_