webserv/webserv/socket/ServerSocket.hpp
2025-10-14 18:47:09 +02:00

22 lines
479 B
C++

#pragma once
#include <webserv/socket/ASocket.hpp>
#include <webserv/socket/ClientSocket.hpp>
#include <memory> // for unique_ptr
#include <string> // for string
class ServerSocket : public ASocket
{
public:
ServerSocket();
ServerSocket(int fd);
void listen(int backlog) const;
void bind(const std::string &host, int port) const;
[[nodiscard]] ASocket::Type getType() const override;
[[nodiscard]] std::unique_ptr<ClientSocket> accept() const;
};