func IsValidPort(port int) bool {
	return 0 < port && port < 65536
}
IsValidPort returns true if port is a valid port number.
package netutil
import (
	"bytes"
	"encoding/binary"
	"errors"
	"fmt"
	"io/ioutil"
	"math/rand"
	"net"
	"net/http"
	"time"
)
var (
	errInvalidData = errors.New("invalid data received")
)
func IsIPv4(ip net.IP) bool {
	return ip.To4() != nil
}