mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
// Copyright 2014 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
[DartPackage="mojo_services"]
|
|
module mojo;
|
|
|
|
import "mojo/public/interfaces/network/network_error.mojom";
|
|
import "network/interfaces/net_address.mojom";
|
|
import "network/interfaces/tcp_connected_socket.mojom";
|
|
|
|
// Represents a TCP server socket listening for incoming requests.
|
|
interface TCPServerSocket {
|
|
// Waits for an incoming connection request and hooks up a TCPConnectedSocket
|
|
// for connecting with the remote host. Only one Accept call can be pending
|
|
// at a time.
|
|
//
|
|
// Once a connection has been established (indicated by a successful
|
|
// callback), the TCPConnectedSocket may outlive the TCPServerSocket that
|
|
// created it.
|
|
//
|
|
// On success, the address of the remote host will be provided.
|
|
Accept(handle<data_pipe_consumer> send_stream,
|
|
handle<data_pipe_producer> receive_stream,
|
|
TCPConnectedSocket& client_socket)
|
|
=> (NetworkError result, NetAddress? remote_address);
|
|
};
|