From 2e2159f30918178bd28633f10264946db32d0e3e Mon Sep 17 00:00:00 2001 From: flswld Date: Wed, 15 Feb 2023 18:50:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DWin=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gate/kcp/session.go | 9 +++++++++ gate/kcp/udp_socket_linux.go | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gate/kcp/session.go b/gate/kcp/session.go index 9b96213f..3c56cf17 100644 --- a/gate/kcp/session.go +++ b/gate/kcp/session.go @@ -56,6 +56,15 @@ func init() { } } +const ( + batchSize = 16 +) + +type batchConn interface { + WriteBatch(ms []ipv4.Message, flags int) (int, error) + ReadBatch(ms []ipv4.Message, flags int) (int, error) +} + type ( // UDPSession defines a KCP session implemented by UDP UDPSession struct { diff --git a/gate/kcp/udp_socket_linux.go b/gate/kcp/udp_socket_linux.go index b1551d2e..856cc6eb 100644 --- a/gate/kcp/udp_socket_linux.go +++ b/gate/kcp/udp_socket_linux.go @@ -13,15 +13,6 @@ import ( "golang.org/x/net/ipv6" ) -const ( - batchSize = 16 -) - -type batchConn interface { - WriteBatch(ms []ipv4.Message, flags int) (int, error) - ReadBatch(ms []ipv4.Message, flags int) (int, error) -} - // the read loop for a client session func (s *UDPSession) readLoop() { // default version