func NewServer(address string, aggregator aggregator.Aggregator, opts Options) xserver.Server {
	iOpts := opts.InstrumentOptions()
	handlerScope := iOpts.MetricsScope().Tagged(map[string]string{"handler": "rawtcp"})
	handler := NewHandler(aggregator, opts.SetInstrumentOptions(iOpts.SetMetricsScope(handlerScope)))
	return xserver.NewServer(address, handler, opts.ServerOptions())
}
NewServer creates a new raw TCP server.
package rawtcp
import (
	"bufio"
	"fmt"
	"io"
	"math/rand"
	"net"
	"sync"
	"time"
	"github.com/m3db/m3aggregator/aggregator"
	"github.com/m3db/m3aggregator/rate"
	"github.com/m3db/m3metrics/encoding"
	"github.com/m3db/m3metrics/encoding/migration"
	"github.com/m3db/m3metrics/encoding/msgpack"
	"github.com/m3db/m3metrics/encoding/protobuf"
	"github.com/m3db/m3metrics/metadata"
	"github.com/m3db/m3metrics/metric/aggregated"
	"github.com/m3db/m3metrics/metric/unaggregated"
	"github.com/m3db/m3x/log"
	xserver "github.com/m3db/m3x/server"
	"github.com/uber-go/tally"
)
const (
	unknownRemoteHostAddress = "<unknown>"
)