chromium/services/network/public/mojom/transferable_socket.mojom

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module network.mojom;

// Represents a socket that can be transferred into the network service. Do
// not create this directly but use network::TransferableSocket class.
[EnableIf=is_win]
struct TransferableSocket {
  // Opaque data of type WSAPROTOCOL_INFOW that contains information required
  // to re-create the socket on the other end.
  array<uint8> protocol_info;
};

[EnableIfNot=is_win]
struct TransferableSocket {
  // On non-Windows platforms this can be the raw socket.
  handle<platform>? socket;
};