Introduce Packet to unify TCP and UDP communication

This commit is contained in:
V2Ray committed 2015-09-22 14:45:03 +02:00
1 parent 4320c14efd
commit 4874cd54a4
12 files changed
+124 -41

No files matched your search

+2 -2
View File
@@ -19,8 +19,8 @@ func (handler *InboundConnectionHandler) Listen(port uint16) error {
return nil
}
func (handler *InboundConnectionHandler) Communicate(dest v2net.Destination) error {
ray := handler.Server.NewInboundConnectionAccepted(dest)
func (handler *InboundConnectionHandler) Communicate(packet v2net.Packet) error {
ray := handler.Server.DispatchToOutbound(packet)
input := ray.InboundInput()
output := ray.InboundOutput()