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