Add support for handling "unknown" protocols.
There is no longer a default protocol for Endpoints. Endpoints that do
not have a protocol will have Endpoint.protocol == "".
There is a new method to the stream registry called
"RegisterUnknownProtocol", which is used to register a Dialer and
Listener for endpoints with no protocol.
All the profiles have been updated to use "wsh" for unknown protocols.
The endpoint sorter in sort_endpoints.go will include endpoints
with unknown protocols last.
MultiPart: 1/3
Change-Id: If0771153fc96bffc8dbc79956c8f12f320696343
diff --git a/profiles/roaming/roaminginit.go b/profiles/roaming/roaminginit.go
index 8dbe076..3d5bfe0 100644
--- a/profiles/roaming/roaminginit.go
+++ b/profiles/roaming/roaminginit.go
@@ -18,12 +18,14 @@
"v.io/core/veyron2/config"
"v.io/core/veyron2/context"
"v.io/core/veyron2/ipc"
+ "v.io/core/veyron2/ipc/stream"
"v.io/core/veyron2/vlog"
"v.io/core/veyron/lib/appcycle"
"v.io/core/veyron/lib/flags"
"v.io/core/veyron/lib/netconfig"
"v.io/core/veyron/lib/netstate"
+ "v.io/core/veyron/lib/websocket"
"v.io/core/veyron/profiles/internal"
_ "v.io/core/veyron/runtimes/google/ipc/protocols/tcp"
_ "v.io/core/veyron/runtimes/google/ipc/protocols/ws"
@@ -46,6 +48,7 @@
func init() {
commonFlags = flags.CreateAndRegister(flag.CommandLine, flags.Listen)
veyron2.RegisterProfileInit(Init)
+ stream.RegisterUnknownProtocol("wsh", websocket.HybridDial, websocket.HybridListener)
}
func Init(ctx *context.T) (veyron2.RuntimeX, *context.T, veyron2.Shutdown, error) {