Documentation ¶
Overview ¶
Package network contains function of facilitate sending and receiving messages via UDP and TCP
Index ¶
- Constants
- func Interfaces(wanted []string) (infs []net.Interface, err error)
- func SendTCP(conn net.Conn, msg []byte) (err error)
- func SendUDP(conn *net.UDPConn, addr *net.UDPAddr, msg []byte) (err error)
- func TCPConn(addr string) (conn net.Conn, err error)
- func UDPConn(inf net.Interface, addr *net.UDPAddr) (conn *net.UDPConn, err error)
Constants ¶
View Source
const UDPMsgRepetitions = 3
UDPMsgRepetitions is the number of repetitive transmission of UDP messages. According to the UPnP Device Architecture 2.0 spec, one message can be sent up to 3 times
Variables ¶
This section is empty.
Functions ¶
func Interfaces ¶
Interfaces returns the network interfaces that are available on the machine (i.e. the interfaces that are up and that are no loopback). If wanted is not empty, the content of that array is interpreted as interface names and only these for these names the corresponding network interfaces are determined and returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.