Merge ThreadSafeReader into ReadWaiter interface

This commit is contained in:
世界 2023-12-06 21:25:48 +08:00
parent 1f02d6daca
commit c17babe0ba
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
13 changed files with 258 additions and 285 deletions

View file

@ -24,8 +24,8 @@ type AssociatePacketReadWaiter struct {
readWaiter N.PacketReadWaiter
}
func (w *AssociatePacketReadWaiter) InitializeReadWaiter(newBuffer func() *buf.Buffer) {
w.readWaiter.InitializeReadWaiter(newBuffer)
func (w *AssociatePacketReadWaiter) InitializeReadWaiter(options N.ReadWaitOptions) (needCopy bool) {
return w.readWaiter.InitializeReadWaiter(options)
}
func (w *AssociatePacketReadWaiter) WaitReadPacket() (buffer *buf.Buffer, destination M.Socksaddr, err error) {