rewrite alloc.buffer

This commit is contained in:
Darien Raymond
2016-12-06 11:03:42 +01:00
parent 4bf8288cc2
commit 8c8f0a53fd
51 changed files with 391 additions and 299 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ func (v *DefaultDispatcher) DispatchToOutbound(session *proxy.SessionInfo) ray.I
}
if session.Inbound != nil && session.Inbound.AllowPassiveConnection {
go dispatcher.Dispatch(destination, alloc.NewLocalBuffer(32).Clear(), direct)
go dispatcher.Dispatch(destination, alloc.NewLocalBuffer(32), direct)
} else {
go v.FilterPacketAndDispatch(destination, direct, dispatcher)
}
+2 -1
View File
@@ -19,7 +19,8 @@ func NewTestPacketDispatcher(handler func(destination v2net.Destination, traffic
if err != nil {
break
}
traffic.OutboundOutput().Write(payload.Prepend([]byte("Processed: ")))
payload.Prepend([]byte("Processed: "))
traffic.OutboundOutput().Write(payload)
}
traffic.OutboundOutput().Close()
}