(conn *smtp.Conn)
| 62 | } |
| 63 | |
| 64 | func (be *SMTPBackend) NewSession(conn *smtp.Conn) (smtp.Session, error) { |
| 65 | be.SessionCounter++ |
| 66 | be.ActiveSessionsCounter.Add(1) |
| 67 | if be.SourceEndpoints == nil { |
| 68 | be.SourceEndpoints = make(map[string]struct{}) |
| 69 | } |
| 70 | be.SourceEndpoints[conn.Conn().RemoteAddr().String()] = struct{}{} |
| 71 | return &session{ |
| 72 | backend: be, |
| 73 | conn: conn, |
| 74 | }, nil |
| 75 | } |
| 76 | |
| 77 | func (be *SMTPBackend) ConnectionCount() int { |
| 78 | return int(be.ActiveSessionsCounter.Load()) |
nothing calls this directly
no test coverage detected