blob: 6a775f1a1bfced77d911460eea83729c94ae3093 [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
3// found in the LICENSE file
4
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 {
11namespace platform {
12
13// A SocketHandle is the handle used to access a Socket by the underlying
14// platform.
15struct SocketHandle;
16
Ryan Keanebcc7ba82019-09-20 14:17:59 -070017struct SocketHandleHash {
18 size_t operator()(const SocketHandle& handle) const;
19};
20
21bool operator==(const SocketHandle& lhs, const SocketHandle& rhs);
22inline bool operator!=(const SocketHandle& lhs, const SocketHandle& rhs) {
23 return !(lhs == rhs);
24}
25
Ryan Keane6e542522019-09-10 16:05:44 -070026} // namespace platform
27} // namespace openscreen
28
Ryan Keane3b88a252019-09-17 09:55:33 -070029#endif // PLATFORM_IMPL_SOCKET_HANDLE_H_