INNER CODE UNIT · Go

StopAll

krypton-byte/neonize · goneonize/main.go:580

func StopAll() {
	keys := make([]string, 0, len(clients))
	for key := range clients {
		keys = append(keys, key)
	}
	for _, key := range keys {
		cKey := C.CString(key)
		Stop(cKey)
		C.free(unsafe.Pointer(cKey))
	}
}

//export Stop
func Stop(id *C.char) {
	utils.Noop.Infof("Stopping client with ID: %s", C.GoString(id)) // utils.Logger
	if client, exists := clients[C.GoString(id)]; exists {
		client.Disconnect()
		delete(clients, C.GoString(id))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…