MCPcopy Create free account
hub / github.com/Bananymous/banan-os / UnixDomainSocket

Method UnixDomainSocket

kernel/kernel/Networking/UNIX/Socket.cpp:55–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54 UnixDomainSocket::UnixDomainSocket(Socket::Type socket_type, const Socket::Info& info)
55 : Socket(info)
56 , m_socket_type(socket_type)
57 , m_sndbuf(s_packet_buffer_size)
58 {
59 switch (socket_type)
60 {
61 case Socket::Type::STREAM:
62 case Socket::Type::SEQPACKET:
63 m_info.emplace<ConnectionInfo>();
64 break;
65 case Socket::Type::DGRAM:
66 m_info.emplace<ConnectionlessInfo>();
67 break;
68 default:
69 ASSERT_NOT_REACHED();
70 }
71 }
72
73 UnixDomainSocket::~UnixDomainSocket()
74 {
75 if (is_bound() && !is_bound_to_unused())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected