#include "third_party/blink/renderer/modules/direct_sockets/tcp_server_readable_stream_wrapper.h"
#include "base/notreached.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_throw_dom_exception.h"
#include "third_party/blink/renderer/core/streams/readable_stream.h"
#include "third_party/blink/renderer/modules/direct_sockets/tcp_socket.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
namespace blink {
TCPServerReadableStreamWrapper::TCPServerReadableStreamWrapper(
ScriptState* script_state,
CloseOnceCallback on_close,
mojo::PendingRemote<network::mojom::blink::TCPServerSocket>
tcp_server_socket)
: … { … }
void TCPServerReadableStreamWrapper::Pull() { … }
void TCPServerReadableStreamWrapper::CloseStream() { … }
void TCPServerReadableStreamWrapper::ErrorStream(int32_t error_code) { … }
void TCPServerReadableStreamWrapper::Trace(Visitor* visitor) const { … }
void TCPServerReadableStreamWrapper::OnAccept(
mojo::PendingReceiver<network::mojom::blink::SocketObserver>
socket_observer,
int result,
const std::optional<net::IPEndPoint>& remote_addr,
mojo::PendingRemote<network::mojom::blink::TCPConnectedSocket>
tcp_socket_remote,
mojo::ScopedDataPipeConsumerHandle receive_stream,
mojo::ScopedDataPipeProducerHandle send_stream) { … }
}