MCPcopy
hub / github.com/gdy666/lucky / replyDataToRemotAddress

Method replyDataToRemotAddress

socketproxy/udpproxy.go:380–390  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

378}
379
380func (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
392func (p *UDPProxy) CheckReadTargetDataGoroutineLimit() error {
393 if GetGlobalUDPPortForwardGroutineCount() >= GetGlobalUDPReadTargetDataMaxgoroutineCountLimit() {

Callers 1

StartProxyMethod · 0.95

Calls 3

PutBufFunction · 0.92
GetKeyMethod · 0.65
SendDataCallbackMethod · 0.65

Tested by

no test coverage detected