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

Method OnDisconnect

Kernel/src/net/socket.cpp:166–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void LocalSocket::OnDisconnect(){
167 connected = false;
168
169 acquireLock(&watcherLock);
170 while(watching.get_length()){
171 watching.remove_at(0)->Signal(); // Signal all watching on disconnect
172 }
173 releaseLock(&watcherLock);
174
175 peer = nullptr;
176}
177
178Socket* LocalSocket::Accept(sockaddr* addr, socklen_t* addrlen, int mode){
179 if((mode & O_NONBLOCK) && pending.get_length() <= 0){

Callers 1

DisconnectPeerMethod · 0.80

Calls 3

SignalMethod · 0.80
get_lengthMethod · 0.45
remove_atMethod · 0.45

Tested by

no test coverage detected