xnet

package
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package xnet Copyright 2009 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

View Source
const (
	MinPort = 0
	MaxPort = 65535
)

Maximum and minimum ports number.

Variables

This section is empty.

Functions

func IsDomainName

func IsDomainName(s string) bool

Source: https://golang.org/src/net/dnsclient.go IsDomainName checks if a string is a presentation-format domain name (currently restricted to hostname-compatible "preferred name" LDH labels and SRV-like "underscore labels"; see golang.org/issue/12421).

func JoinHostPort

func JoinHostPort(host string, port int) string

JoinHostPort combines host and port into a network address of the form "host:port" or, if host contains a colon or a percent sign, "[host]:port".

func SplitHostPort

func SplitHostPort(hostport string) (string, int, error)

SplitHostPort splits a network address of the form "host:port", "host%zone:port", "[host]:port" or "[host%zone]:port" into host or host%zone and port.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL