• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
5 #ifndef PLATFORM_IMPL_SOCKET_HANDLE_H_
6 #define PLATFORM_IMPL_SOCKET_HANDLE_H_
7 
8 #include <cstdlib>
9 
10 namespace openscreen {
11 
12 // A SocketHandle is the handle used to access a Socket by the underlying
13 // platform.
14 struct SocketHandle;
15 
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 
25 }  // namespace openscreen
26 
27 #endif  // PLATFORM_IMPL_SOCKET_HANDLE_H_
28