MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / MessageServer

Method MessageServer

LibLemon/src/ipc/interfaceuds.cpp:24–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22 }
23
24 MessageServer::MessageServer(sockaddr_un& address, socklen_t len){
25 sock.fd = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0);
26 assert(sock.fd > 0);
27
28 int e = bind(sock.fd, (sockaddr*)&address, len);
29
30 if(e){
31 perror("Bind: ");
32 close(sock.fd);
33 assert(!e);
34 }
35
36 e = listen(sock.fd, 16);
37
38 if(e){
39 perror("Listen: ");
40 close(sock.fd);
41 assert(!e);
42 }
43 }
44
45 void MessageClient::Connect(sockaddr_un& address, socklen_t len){
46 int e = connect(sock.fd, (sockaddr*)&address, len);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected