()
| 21 | } |
| 22 | |
| 23 | func InitCfcProxy() error { |
| 24 | protocol := &tcp.DefaultProtocol{} |
| 25 | protocol.SetMaxPacketSize(uint32(GlobalConfig.MaxPacketSize)) |
| 26 | s := tcp.NewAsyncTCPServer(GlobalConfig.TCPBind, &callback{}, protocol) |
| 27 | proxy = &CFCProxy{ |
| 28 | s, |
| 29 | &tcp.TCPConn{}, |
| 30 | make(map[string]string), |
| 31 | sync.RWMutex{}, |
| 32 | } |
| 33 | return proxy.srv.ListenAndServe() |
| 34 | } |
| 35 | |
| 36 | // 发送插件同步请求 |
| 37 | func (proxy *CFCProxy) sendSyncPluginRequest(hostID string, p types.Plugin) error { |
no test coverage detected