mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-12 21:18:35 -07:00
udp: Add basic UDP tests
This commit is contained in:
@@ -71,10 +71,11 @@ func (s *Server) serve(listenAddr string) error {
|
||||
|
||||
go func() {
|
||||
response, action := s.handlePacket(buffer[:n], addr)
|
||||
pool.GiveSlice(buffer)
|
||||
|
||||
if response != nil {
|
||||
sock.WriteToUDP(response, addr)
|
||||
}
|
||||
pool.GiveSlice(buffer)
|
||||
|
||||
if glog.V(2) {
|
||||
duration := time.Since(start)
|
||||
|
||||
Reference in New Issue
Block a user