Add Server.Address() function to return listener address of a Server
This is useful for logging, etc.
This commit is contained in:
parent
aee434025e
commit
9fc41453a7
1 changed files with 5 additions and 0 deletions
5
smtpd.go
5
smtpd.go
|
@ -236,6 +236,11 @@ func (srv *Server) Shutdown() error {
|
|||
return lnerr
|
||||
}
|
||||
|
||||
// Address returns the listening address of the server
|
||||
func (srv *Server) Address() net.Addr {
|
||||
return (*srv.listener).Addr();
|
||||
}
|
||||
|
||||
func (srv *Server) configureDefaults() {
|
||||
|
||||
if srv.MaxMessageSize == 0 {
|
||||
|
|
Loading…
Add table
Reference in a new issue