Endpoint.loopback constructor
Endpoint.loopback({
- Port port = Port.any,
Creates a Loopback endpoint bound to the address of the local machine (127.0.0.1).
port
represents the port the endpoint is bound to.
A UDP instance can bind to a Endpoint.loopback endpoint as a sender or as a receiver. As a sender, a UDP instance can send data to a Endpoint.loopback endpoint.
Implementation
Endpoint.loopback({Port port = Port.any}) {
_address = InternetAddress.loopbackIPv4;
_port = port;
}