trans

package
v0.24.28 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WsConnect

func WsConnect(cnxAddr *endp.Addr) (ws *websocket.Conn, err error)

func WsListen

func WsListen(ws *websocket.Conn)

wsListen is for server side WS connection accept. WS clients just listen. So server is passive here as well.

Types

type EchoListener

type EchoListener func(im *mesg.Payload) (while bool, err error)

type Transport

type Transport struct {
	PLPipe  sec.Pipe // Payload communication pipe
	MsgPipe sec.Pipe // Message communication
	Endp    string   // Given endpoint
}

Transport is communication mechanism between EA to CA, client to server. Server side is not supported yet, but coming. With Transport EA can communicate easily with its CA.

func (Transport) Call

func (tr Transport) Call(msgType string, msg *mesg.Msg) (rp *mesg.Payload, err error)

func (Transport) DIDComCallEndp

func (tr Transport) DIDComCallEndp(endp, msgType string, msg didcomm.Msg) (rp didcomm.Payload, err error)

func (Transport) DecDIDComMsg

func (tr Transport) DecDIDComMsg(msg didcomm.Msg) didcomm.Msg

func (Transport) DecMsg

func (tr Transport) DecMsg(msg *mesg.Msg) *mesg.Msg

func (Transport) EncDIDComMsg

func (tr Transport) EncDIDComMsg(msg didcomm.Msg) didcomm.Msg

func (Transport) EncMsg

func (tr Transport) EncMsg(msg *mesg.Msg) *mesg.Msg

func (Transport) EndpAddr

func (tr Transport) EndpAddr() string

func (Transport) Endpoint

func (tr Transport) Endpoint() string

func (Transport) MessagePipe

func (tr Transport) MessagePipe() sec.Pipe

func (Transport) Notify

func (tr Transport) Notify(ws *websocket.Conn, pl *mesg.Payload) error

func (Transport) PayloadPipe

func (tr Transport) PayloadPipe() sec.Pipe

func (Transport) SendPayload

func (tr Transport) SendPayload(p *mesg.Payload, orgNonce uint64) (*mesg.Payload, error)

func (Transport) SetMessageOut

func (tr Transport) SetMessageOut(d *ssi.DID)

func (Transport) String

func (tr Transport) String() string

func (Transport) WsListenLoop

func (tr Transport) WsListenLoop(sName string, echo EchoListener) (err error)

Jump to

Keyboard shortcuts

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