byteorder

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package byteorder provides functions to convert from and to network byte order.

Index

Constants

This section is empty.

Variables

View Source
var Native = getNativeEndian()

Native is set to the host ByteOrder type. This should normally be either BigEndian or LittleEndian.

Functions

func HostSliceToNetwork

func HostSliceToNetwork(b []byte, t reflect.Kind) interface{}

HostSliceToNetwork converts b to the networking byte order.

func HostToNetwork

func HostToNetwork(b interface{}) interface{}

HostToNetwork converts b to the networking byte order.

func HostToNetworkPut

func HostToNetworkPut(b []byte, v interface{})

HostToNetworkPut puts v into b with the networking byte order.

func HostToNetworkSlice

func HostToNetworkSlice(b []byte, t reflect.Kind) interface{}

HostToNetworkSlice converts b to the networking byte order.

func NetworkToHost

func NetworkToHost(n interface{}) interface{}

NetworkToHost converts n to host byte order.

func NetworkToHostPut

func NetworkToHostPut(b []byte, v interface{})

NetworkToHostPut puts v into b with the networking byte order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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