MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / uninit_socket

Method uninit_socket

source/AgentCommon/Transceiver.cpp:226–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226void Transceiver::uninit_socket()
227{
228 LogFunc << VAR(ipc_addr_);
229
230 // if (connected()) {
231 // if (is_bound_) {
232 // zmq_sock_.unbind(ipc_addr_);
233 // }
234 // else {
235 // zmq_sock_.disconnect(ipc_addr_);
236 // }
237 // }
238
239 zmq_sock_.close();
240 zmq_ctx_.close();
241
242 // TCP 模式无需删除 socket 文件
243 if (!is_tcp_) {
244 std::error_code ec;
245 std::filesystem::remove(ipc_path_, ec);
246 }
247}
248
249bool Transceiver::alive()
250{

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected