Skip to content
pubscout

dart_ipc

2.0.2, released 2 months ago by monkeywie.cn

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

$ flutter pub add dart_ipc
Source repository

What it does

Provides efficient communication between local processes across Windows, Linux, macOS, iOS, and Android. Uses native platform mechanisms like named pipes via Dart FFI on Windows and Unix domain sockets on Unix systems.

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

Use it when

  • You need to communicate between different Dart or native processes on the same device.
  • You want native performance for local inter-process communication without a Flutter C++ plugin layer.

Skip it when

  • You need network communication over TCP/IP across remote machines.
  • You are targeting web applications where IPC mechanisms are not supported.

Strengths

  • Cross-platform support including Windows, Linux, macOS, iOS, and Android.
  • Pure Dart package with no Flutter C++ plugin layer required.
  • Compatible with standard socket APIs.

Weaknesses

  • Unix domain socket paths are constrained by short OS length limits.
  • Not supported on web platforms.

Setup

Kind
FFI (native library)
Effort
Low
Code generation
No
Direct dependencies
2

No complex setup required; pure Dart package with FFI implementation.

import 'package:dart_ipc/dart_ipc.dart';

void main() async {
  final serverSocket = await bind(path);
  await for (final socket in serverSocket) {
    socket.listen((data) {
      socket.add(utf8.encode('Hello from Server'));
    });
  }
}

Alternatives

Packages that do the same job and could replace dart_ipc.

  • udp

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

Works with

Packages commonly used together with dart_ipc: ones it builds on, ones built on it, and its own family.