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
@@ -288,13 +288,6 @@ func (v *Server) handlePlainHTTP(request *http.Request, session *proxy.SessionIn
// ServerFactory is a InboundHandlerFactory.
type ServerFactory struct{}
// StreamCapability implements InboundHandlerFactory.StreamCapability().
func (v *ServerFactory) StreamCapability() v2net.NetworkList {
return v2net.NetworkList{
Network: []v2net.Network{v2net.Network_TCP},
}
}
// Create implements InboundHandlerFactory.Create().
func (v *ServerFactory) Create(space app.Space, rawConfig interface{}, meta *proxy.InboundHandlerMeta) (proxy.InboundHandler, error) {
return NewServer(rawConfig.(*ServerConfig), space, meta), nil