Skip to content
pubscout

udp

5.0.3, released 5 years ago by an unverified publisher

Lightweight UDP library for Dart supporting Unicast, Broadcast, Multicast and Loopback communications.

$ flutter pub add udp
Source repository

What it does

Provides a UDP implementation for sending and receiving datagrams over the network. Supports binding to endpoints, broadcasting, multicasting, and handling data streams.

AI-written summary of version 5.0.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to send or receive UDP datagrams in Dart
  • You need support for broadcast, multicast, or loopback communications

Skip it when

  • You need reliable, connection-oriented TCP communication
  • You are communicating over HTTP, WebSockets, or gRPC

Strengths

  • Easy to use API with stream support
  • Supports unicast, broadcast, multicast, and loopback
  • No external dependencies

Weaknesses

  • Limited to UDP protocol capabilities (no built-in reliability or ordering)

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
var sender = await UDP.bind(Endpoint.any(port: Port(65000)));
var dataLength = await sender.send("Hello World!".codeUnits, Endpoint.broadcast(port: Port(65001)));
sender.close();

Alternatives

Packages that do the same job and could replace udp.

  • dart_ipc

    Cross-platform inter-process communication library using named pipes and Unix domain sockets.