protobufc

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: BSD-3-Clause Imports: 10 Imported by: 0

README

protobufc

Build Status GoDoc

Simple protobuf net/rpc ServerCodec and ClientCodec implementation for https://github.com/gogo/protobuf

Install

Install protobufc package:

  1. go get github.com/cgrates/protobufc
  2. go run hello.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(network, address string) (*rpc.Client, error)

Dial connects to a Protobuf-RPC server at the specified network address.

func DialTimeout

func DialTimeout(network, address string, timeout time.Duration) (*rpc.Client, error)

DialTimeout connects to a Protobuf-RPC server at the specified network address.

func NewClient

func NewClient(conn io.ReadWriteCloser) *rpc.Client

NewClient returns a new rpc.Client to handle requests to the set of services at the other end of the connection.

func NewClientCodec

func NewClientCodec(conn io.ReadWriteCloser) rpc.ClientCodec

NewClientCodec returns a new rpc.ClientCodec using Protobuf-RPC on conn.

func NewServerCodec

func NewServerCodec(conn io.ReadWriteCloser) rpc.ServerCodec

NewServerCodec returns a serverCodec that communicates with the ClientCodec on the other end of the given conn.

func ServeConn

func ServeConn(conn io.ReadWriteCloser)

ServeConn runs the Protobuf-RPC server on a single connection. ServeConn blocks, serving the connection until the client hangs up. The caller typically invokes ServeConn in a go statement.

Types

This section is empty.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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