GithubHelp home page GithubHelp logo

dart-rfb's Introduction

dart-rfb

Implementation of The Remote Framebuffer Protocol (RFC 6143, aka VNC protocol).

https://pub.dev/packages/dart_rfb

Motivation

We were searching a VNC viewer package for Flutter - without success. Then there was a discussion about how complex the protocol is and wether we should implement it ourself. Estimations ranged from 5 days to 100 days and we began joking that I'd be able to do it "after the weekend". And here we are, after a weekend, with the first, minimal, protocol implementation.

Supported Features

Protocol Versions

  • ✅ 3.3
  • ✅ 3.7
  • ✅ 3.8

Encodings

  • ✅ Raw
  • ✅ CopyRect
  • ⬜ RRE (obsolescent)
  • ⬜ Hextile (obsolescent)
  • ⬜ TRLE
  • ⬜ ZRLE
  • ⬜ Cursor pseudo-encoding
  • ⬜ DesktopSize pseudo-encoding

Security Types

  • ✅ None
  • ✅ VNC Authentication

Pixel Formats

Protocol Messages

  • ✅ ProtocolVersion handshake
  • ✅ Security handshake
  • ✅ SecurityResult handshake
  • ✅ ClientInit
  • ✅ ServerInit
  • Client-to-Server
    • ✅ SetPixelFormat
    • ✅ SetEncodings
    • ✅ FramebufferUpdateRequest
    • ✅ KeyEvent
    • ✅ PointerEvent
    • ✅ ClientCutText
  • Server-to-Client
    • ✅ FramebufferUpdate
    • ⬜ SetColorMapEntries
    • ⬜ Bell
    • ✅ ServerCutText

Installation

As simple as dart pub add dart_rfb.

Or manually add dart_rfb: ^<latest-version> to your pubspec.yaml.

Usage

final RemoteFrameBufferClient client = RemoteFrameBufferClient()
await client.connect(
  hostname: '127.0.0.1',
  password: 'password',
);
client.updateStream.listen(
  (final RemoteFrameBufferClientUpdate update) {
    // Update your framebuffer
  },
);
// To let the package handle incoming messages
client.handleIncomingMessages();
// Or handle yourself
StreamSubscription<RemoteFrameBufferClientReadMessage> subscription =
    client.incomingMessages.listen(
  (final RemoteFrameBufferClientReadMessage message) {
    // Do something
  },
);
// Request an initial framebuffer update
client.requestUpdate();

Learn More

https://www.rfc-editor.org/rfc/rfc6143

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.