| 30 | } |
| 31 | |
| 32 | void wf::ipc::server_t::init(std::string socket_path) |
| 33 | { |
| 34 | this->fd = setup_socket(socket_path.c_str()); |
| 35 | if (fd == -1) |
| 36 | { |
| 37 | LOGE("Failed to create debug IPC socket!"); |
| 38 | return; |
| 39 | } |
| 40 | |
| 41 | listen(fd, 3); |
| 42 | source = wl_event_loop_add_fd(wl_display_get_event_loop(wf::get_core().display), |
| 43 | fd, WL_EVENT_READABLE, wl_loop_handle_ipc_fd_connection, &accept_new_client); |
| 44 | } |
| 45 | |
| 46 | wf::ipc::server_t::~server_t() |
| 47 | { |