package curvesession
import "github.com/hlandau/parazmq/curvesession"
Index ¶
- type CurveConfig
- type CurveSession
- func New(fc abstract.FrameConn, cfg CurveConfig) (cs *CurveSession, err error)
- func (s *CurveSession) Close() error
- func (s *CurveSession) ReceiveFrame() (data []byte, flags abstract.ZMTPFlags, err error)
- func (s *CurveSession) RemoteMetadata() map[string]string
- func (s *CurveSession) SendFrame(data []byte, flags abstract.ZMTPFlags) error
Types ¶
type CurveConfig ¶
type CurveConfig struct { IsServer bool // determines which role is taken in the handshake. Curvek [32]byte // own private key CurveS [32]byte // server's public key (required only if we are a client) Metadata map[string]string // metadata to send to server }
type CurveSession ¶
func New ¶
func New(fc abstract.FrameConn, cfg CurveConfig) (cs *CurveSession, err error)
Creates a new FrameConn implementing CurveZMQ.
Calling this function will cause the CurveZMQ handshake to be performed over the provided underlying FrameConn.
Takes ownership of the underlying FrameConn and closes it when the returned FrameConn is closed.
Do not call methods on the underlying FrameConn after calling this.
func (*CurveSession) Close ¶
func (s *CurveSession) Close() error
func (*CurveSession) ReceiveFrame ¶
func (s *CurveSession) ReceiveFrame() (data []byte, flags abstract.ZMTPFlags, err error)
func (*CurveSession) RemoteMetadata ¶
func (s *CurveSession) RemoteMetadata() map[string]string
Get the metadata sent by the remote party, if any.
func (*CurveSession) SendFrame ¶
func (s *CurveSession) SendFrame(data []byte, flags abstract.ZMTPFlags) error
Source Files ¶
- Version
- v0.0.0-20210323063629-d55c8d2d05c8 (latest)
- Published
- Mar 23, 2021
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 1 month ago –
Tools for package owners.