1'
This commit is contained in:
@@ -293,6 +293,15 @@ func (t *TcpClient) addCallbackChan(key, data string) {
|
||||
t.CallBackMap[key] <- data
|
||||
}
|
||||
|
||||
func (t *TcpClient) GetCallbackChan(key string) string {
|
||||
t.RLock()
|
||||
defer t.RUnlock()
|
||||
if t.CallBackMap[key] == nil {
|
||||
return ""
|
||||
}
|
||||
return <-t.CallBackMap[key]
|
||||
}
|
||||
|
||||
func (t *TcpClient) clear(key string) {
|
||||
t.Lock()
|
||||
defer t.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user