Exemple #1
0
// in proton goroutine
func newSession(c *connection, es proton.Session) *session {
	return &session{
		connection: c,
		eSession:   es,
		endpoint:   endpoint{str: es.String()},
	}
}
Exemple #2
0
// in proton goroutine
func newSession(c *connection, es proton.Session, setting ...SessionOption) *session {
	s := &session{
		connection: c,
		pSession:   es,
	}
	s.endpoint.init(es.String())
	for _, set := range setting {
		set(s)
	}
	c.handler.sessions[s.pSession] = s
	s.pSession.SetIncomingCapacity(s.capacity)
	s.pSession.Open()
	return s
}