chromium/third_party/blink/renderer/modules/direct_sockets/tcp_server_socket.cc

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

#include "third_party/blink/renderer/modules/direct_sockets/tcp_server_socket.h"

#include "base/functional/callback_helpers.h"
#include "base/metrics/histogram_functions.h"
#include "base/notreached.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_tcp_server_socket_open_info.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_tcp_server_socket_options.h"
#include "third_party/blink/renderer/core/streams/readable_stream.h"
#include "third_party/blink/renderer/modules/direct_sockets/tcp_server_readable_stream_wrapper.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"

namespace blink {

namespace {

mojom::blink::DirectTCPServerSocketOptionsPtr CreateTCPServerSocketOptions(
    const String& local_address,
    const TCPServerSocketOptions* options,
    ExceptionState& exception_state) {}

}  // namespace

TCPServerSocket::TCPServerSocket(ScriptState* script_state)
    :{}

TCPServerSocket::~TCPServerSocket() = default;

// static
TCPServerSocket* TCPServerSocket::Create(ScriptState* script_state,
                                         const String& local_address,
                                         const TCPServerSocketOptions* options,
                                         ExceptionState& exception_state) {}

ScriptPromise<TCPServerSocketOpenInfo> TCPServerSocket::opened(
    ScriptState* script_state) const {}

ScriptPromise<IDLUndefined> TCPServerSocket::close(
    ScriptState* script_state,
    ExceptionState& exception_state) {}

bool TCPServerSocket::Open(const String& local_addr,
                           const TCPServerSocketOptions* options,
                           ExceptionState& exception_state) {}

void TCPServerSocket::OnTCPServerSocketOpened(
    mojo::PendingRemote<network::mojom::blink::TCPServerSocket>
        tcp_server_remote,
    int32_t result,
    const std::optional<net::IPEndPoint>& local_addr) {}

void TCPServerSocket::Trace(Visitor* visitor) const {}

void TCPServerSocket::ContextDestroyed() {}

void TCPServerSocket::ReleaseResources() {}

void TCPServerSocket::OnReadableStreamClosed(ScriptValue exception) {}

}  // namespace blink