#include "net/socket/tcp_server_socket.h"
#include <memory>
#include <utility>
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/notreached.h"
#include "net/base/net_errors.h"
#include "net/socket/socket_descriptor.h"
#include "net/socket/tcp_client_socket.h"
namespace net {
TCPServerSocket::TCPServerSocket(NetLog* net_log, const NetLogSource& source)
: … { … }
TCPServerSocket::TCPServerSocket(std::unique_ptr<TCPSocket> socket)
: … { … }
int TCPServerSocket::AdoptSocket(SocketDescriptor socket) { … }
TCPServerSocket::~TCPServerSocket() = default;
int TCPServerSocket::Listen(const IPEndPoint& address,
int backlog,
std::optional<bool> ipv6_only) { … }
int TCPServerSocket::GetLocalAddress(IPEndPoint* address) const { … }
int TCPServerSocket::Accept(std::unique_ptr<StreamSocket>* socket,
CompletionOnceCallback callback) { … }
int TCPServerSocket::Accept(std::unique_ptr<StreamSocket>* socket,
CompletionOnceCallback callback,
IPEndPoint* peer_address) { … }
void TCPServerSocket::DetachFromThread() { … }
int TCPServerSocket::ConvertAcceptedSocket(
int result,
std::unique_ptr<StreamSocket>* output_accepted_socket,
IPEndPoint* output_accepted_address) { … }
void TCPServerSocket::OnAcceptCompleted(
std::unique_ptr<StreamSocket>* output_accepted_socket,
IPEndPoint* output_accepted_address,
CompletionOnceCallback forward_callback,
int result) { … }
}