createUdp4Socket function

DgramSocket createUdp4Socket()

Creates a udp4 datagram socket.

Implementation

DgramSocket createUdp4Socket() {
  final factory = _dgram().getProperty<JSFunction>('createSocket'.toJS);

  return factory.callAsFunction(_dgram(), 'udp4'.toJS) as DgramSocket;
}