Kqueue-based server class. More...
#include <kqueue_server.hpp>
Public Member Functions | |
| KqueueServer (const std::string &addr, int port) | |
| KqueueServer constructor. | |
| void | run () |
| Run the server loop. | |
Kqueue-based server class.
This class implements a Kqueue-based server that handles client connections and processes RESP commands. It uses the LSMTree engine for data storage and retrieval. The server listens for incoming connections, decodes RESP commands, and sends responses back to the clients.
|
inline |
KqueueServer constructor.
| addr | Address to bind the server socket to |
| port | Port number to bind the server socket to |
This constructor initializes the server socket, kqueue, and event list.
|
inline |
Run the server loop.
This function enters the main event loop, waiting for events on the kqueue and handling them accordingly.