native

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package native provides an API for Native Messaging for Chrome extensions.

See https://developer.chrome.com/apps/nativeMessaging for more details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Accept

func Accept() io.ReadWriter

Accept accepts a single client connection.

Notes that communication is done via stdio/stdout, thus an application should not read/write any data to/from these streams.

func Recv

func Recv(dst interface{}) error

Recv receives a message and decodes it into dst.

func RecvBinary

func RecvBinary() ([]byte, error)

RecvBinary receives a single binary message.

The format of the binary messages is not defined in any spec, thus a custom message format is used to transfer binary data.

func Send

func Send(obj interface{}) error

Send sends a message.

func SendBinary

func SendBinary(p []byte) error

SendBinary sends a single binary message.

The format of the binary messages is not defined in any spec, thus a custom message format is used to transfer binary data.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL