Ryan Keane | 6e54252 | 2019-09-10 16:05:44 -0700 | [diff] [blame] | 1 | // 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 Bayles | cea81af | 2020-10-01 14:59:38 -0700 | [diff] [blame^] | 3 | // found in the LICENSE file. |
Ryan Keane | 6e54252 | 2019-09-10 16:05:44 -0700 | [diff] [blame] | 4 | |
Ryan Keane | 3b88a25 | 2019-09-17 09:55:33 -0700 | [diff] [blame] | 5 | #ifndef PLATFORM_IMPL_SOCKET_HANDLE_H_ |
| 6 | #define PLATFORM_IMPL_SOCKET_HANDLE_H_ |
Ryan Keane | 6e54252 | 2019-09-10 16:05:44 -0700 | [diff] [blame] | 7 | |
Ryan Keane | bcc7ba8 | 2019-09-20 14:17:59 -0700 | [diff] [blame] | 8 | #include <cstdlib> |
| 9 | |
Ryan Keane | 6e54252 | 2019-09-10 16:05:44 -0700 | [diff] [blame] | 10 | namespace openscreen { |
Ryan Keane | 6e54252 | 2019-09-10 16:05:44 -0700 | [diff] [blame] | 11 | |
| 12 | // A SocketHandle is the handle used to access a Socket by the underlying |
| 13 | // platform. |
| 14 | struct SocketHandle; |
| 15 | |
Ryan Keane | bcc7ba8 | 2019-09-20 14:17:59 -0700 | [diff] [blame] | 16 | struct SocketHandleHash { |
| 17 | size_t operator()(const SocketHandle& handle) const; |
| 18 | }; |
| 19 | |
| 20 | bool operator==(const SocketHandle& lhs, const SocketHandle& rhs); |
| 21 | inline bool operator!=(const SocketHandle& lhs, const SocketHandle& rhs) { |
| 22 | return !(lhs == rhs); |
| 23 | } |
| 24 | |
Ryan Keane | 6e54252 | 2019-09-10 16:05:44 -0700 | [diff] [blame] | 25 | } // namespace openscreen |
| 26 | |
Ryan Keane | 3b88a25 | 2019-09-17 09:55:33 -0700 | [diff] [blame] | 27 | #endif // PLATFORM_IMPL_SOCKET_HANDLE_H_ |