Use snake_case for Connection etc methods
This commit is contained in:
@@ -50,11 +50,11 @@ Server::Server(const weaseldb::Config &config, ConnectionHandler &handler,
|
||||
// Setup shutdown pipe for graceful shutdown
|
||||
setup_shutdown_pipe();
|
||||
|
||||
// Create epoll instances immediately for createLocalConnection() support
|
||||
// Create epoll instances immediately for create_local_connection() support
|
||||
create_epoll_instances();
|
||||
|
||||
// If empty vector provided, listen_fds_ will be empty (no listening)
|
||||
// Server works purely with createLocalConnection()
|
||||
// Server works purely with create_local_connection()
|
||||
}
|
||||
|
||||
Server::~Server() {
|
||||
@@ -137,7 +137,7 @@ void Server::shutdown() {
|
||||
}
|
||||
}
|
||||
|
||||
void Server::releaseBackToServer(std::unique_ptr<Connection> connection) {
|
||||
void Server::release_back_to_server(std::unique_ptr<Connection> connection) {
|
||||
if (!connection) {
|
||||
return; // Nothing to release
|
||||
}
|
||||
@@ -182,7 +182,7 @@ void Server::receiveConnectionBack(std::unique_ptr<Connection> connection) {
|
||||
}
|
||||
}
|
||||
|
||||
int Server::createLocalConnection() {
|
||||
int Server::create_local_connection() {
|
||||
int sockets[2];
|
||||
if (socketpair(AF_UNIX, SOCK_STREAM, 0, sockets) != 0) {
|
||||
perror("socketpair");
|
||||
@@ -195,12 +195,12 @@ int Server::createLocalConnection() {
|
||||
int flags = fcntl(server_fd, F_GETFL, 0);
|
||||
if (flags == -1) {
|
||||
std::fprintf(stderr,
|
||||
"Server::createLocalConnection: fcntl F_GETFL failed\n");
|
||||
"Server::create_local_connection: fcntl F_GETFL failed\n");
|
||||
std::abort();
|
||||
}
|
||||
if (fcntl(server_fd, F_SETFL, flags | O_NONBLOCK) == -1) {
|
||||
std::fprintf(stderr,
|
||||
"Server::createLocalConnection: fcntl F_SETFL failed\n");
|
||||
"Server::create_local_connection: fcntl F_SETFL failed\n");
|
||||
std::abort();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user