<commit_before>// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build linux darwin

// Package roaming implements a RuntimeFactory suitable for a variety of network
// configurations, including 1-1 NATs, dhcp auto-configuration, Amazon Web
// Services and Google Compute Engine.
//
// The pubsub.Publisher mechanism is used for communicating networking
// settings to the rpc.Server implementation of the runtime and publishes
// the Settings it expects.
package roaming

import (
	"v.io/x/ref/runtime/factories/library"

	"v.io/v23/flow"

	"v.io/x/ref/runtime/protocols/lib/websocket"
	_ "v.io/x/ref/runtime/protocols/tcp" // Initialize tcp, ws and wsh.
	_ "v.io/x/ref/runtime/protocols/ws"
	_ "v.io/x/ref/runtime/protocols/wsh"
)

func init() {
	library.Roam = true
	library.CloudVM = true
	library.ConfigureLoggingFromFlags = true
	library.ReservedNameDispatcher = true
	flow.RegisterUnknownProtocol("wsh", websocket.WSH{})
	library.EnableCommandlineFlags()
}<commit_msg>x/ref/factories/roaming: enable roaming with the new x/lib/netconfig changes (#68)<commit_after>// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build linux darwin

// Package roaming implements a RuntimeFactory suitable for a variety of network
// configurations, including 1-1 NATs, dhcp auto-configuration, Amazon Web
// Services and Google Compute Engine.
//
// The pubsub.Publisher mechanism is used for communicating networking
// settings to the rpc.Server implementation of the runtime and publishes
// the Settings it expects.
package roaming

import (
	"v.io/x/lib/netconfig"
	"v.io/x/lib/netconfig/osnetconfig"
	"v.io/x/ref/runtime/factories/library"

	"v.io/v23/flow"

	"v.io/x/ref/runtime/protocols/lib/websocket"
	_ "v.io/x/ref/runtime/protocols/tcp" // Initialize tcp, ws and wsh.
	_ "v.io/x/ref/runtime/protocols/ws"
	_ "v.io/x/ref/runtime/protocols/wsh"
)

func init() {
	library.Roam = true
	library.CloudVM = true
	library.ConfigureLoggingFromFlags = true
	library.ReservedNameDispatcher = true
	flow.RegisterUnknownProtocol("wsh", websocket.WSH{})
	library.EnableCommandlineFlags()
	netconfig.SetOSNotifier(osnetconfig.NewNotifier(0))
}
{'fraction_non_alphanumeric': 0.1087689713322091, 'fraction_numerical': 0.008010118043844857, 'mean_word_length': 4.059701492537314, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4031356', 'n_tokens_mistral': 788, 'n_tokens_neox': 745, 'n_words': 219}