MCPcopy Create free account
hub / github.com/TheRedDeveloper/ply-engine / close

Method close

src/net/websocket.rs:91–97  ·  view source on GitHub ↗

Graceful close. Consumes the handle and removes the entry immediately.

(self)

Source from the content-addressed store, hash-verified

89
90 /// Graceful close. Consumes the handle and removes the entry immediately.
91 pub fn close(self) {
92 let mut mgr = super::NET_MANAGER.lock().unwrap();
93 if let Some(entry) = mgr.websockets.get(&self.id) {
94 entry.state.close();
95 }
96 mgr.websockets.remove(&self.id);
97 }
98}
99
100/// Internal state for a tracked WebSocket (native).

Callers 4

ply_net_ws_closeFunction · 0.80
ply_storage_save_bytesFunction · 0.80
uFunction · 0.80
lFunction · 0.80

Calls 4

ply_net_ws_closeFunction · 0.85
getMethod · 0.80
removeMethod · 0.80
sendMethod · 0.80

Tested by

no test coverage detected