separate network and transport protocol

This commit is contained in:
Darien Raymond
2017-01-12 12:54:34 +01:00
parent f9b3a1446a
commit d24fe9dbfb
41 changed files with 261 additions and 321 deletions
-7
View File
@@ -167,13 +167,6 @@ func (v *Client) Dispatch(destination v2net.Destination, ray ray.OutboundRay) {
// ClientFactory is a OutboundHandlerFactory.
type ClientFactory struct{}
// StreamCapability implements OutboundHandlerFactory.StreamCapability().
func (ClientFactory) StreamCapability() v2net.NetworkList {
return v2net.NetworkList{
Network: []v2net.Network{v2net.Network_TCP},
}
}
// Create implements OutboundHandlerFactory.Create().
func (ClientFactory) Create(space app.Space, rawConfig interface{}, meta *proxy.OutboundHandlerMeta) (proxy.OutboundHandler, error) {
return NewClient(rawConfig.(*ClientConfig), space, meta)
-6
View File
@@ -218,12 +218,6 @@ func (v *Server) handleConnection(conn internet.Connection) {
type ServerFactory struct{}
func (v *ServerFactory) StreamCapability() v2net.NetworkList {
return v2net.NetworkList{
Network: []v2net.Network{v2net.Network_TCP},
}
}
func (v *ServerFactory) Create(space app.Space, rawConfig interface{}, meta *proxy.InboundHandlerMeta) (proxy.InboundHandler, error) {
return NewServer(rawConfig.(*ServerConfig), space, meta)
}