Exemplo n.º 1
0
func NewClient(conv otr3.Conversation) *Client {
	ops := &otr3.SmpOptions{conv}
	sec := &otr3.SmpSecretParams{conv}

	c := &Client{
		smp:       smp.NewProtocol(ops),
		secParams: sec,
		state:     notStarted,

		//smpEventHandler: handler,
	}

	// go c.watchEvents()

	return c
}
Exemplo n.º 2
0
// NewProtocol returns a channel-based SMP protocol
func NewProtocol(version int) *Protocol {
	return &Protocol{
		Protocol: smp.NewProtocol(version),
	}
}