()
| 378 | } |
| 379 | |
| 380 | func (p *UDPProxy) replyDataToRemotAddress() { |
| 381 | for msg := range p.replyCh { |
| 382 | _, err := p.listenConn.WriteToUDP(*(msg.data), msg.remoteAddr) |
| 383 | pool.PutBuf(*msg.data) |
| 384 | if err != nil { |
| 385 | p.log.Errorf("[%s]转发目标端口数据到远程端口出错:%s", p.GetKey(), err.Error()) |
| 386 | continue |
| 387 | } |
| 388 | p.SendDataCallback(int64(msg.dataSize)) //发送流量记录 |
| 389 | } |
| 390 | } |
| 391 | |
| 392 | func (p *UDPProxy) CheckReadTargetDataGoroutineLimit() error { |
| 393 | if GetGlobalUDPPortForwardGroutineCount() >= GetGlobalUDPReadTargetDataMaxgoroutineCountLimit() { |
no test coverage detected