Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn interface { // Write serializes the given PDU and writes to the connection. Write(p pdu.Body) error // Close terminates the connection. Close() error // RemoteAddr returns the peer address. RemoteAddr() net.Addr }
Conn implements a server side connection.
type HandlerFunc ¶
type HandlerFunc func(c Conn, submit *message.ShortMessage) (*message.ShortMessageResp, error)
HandlerFunc is the signature of a function passed to Server instances, that is called when client PDU messages arrive.
type Server ¶
type Server struct { Accounts map[string]Account SystemID string `valid:"required"` Port int `valid:"required"` TLS *tls.Config Handler HandlerFunc // contains filtered or unexported fields }
Server is an SMPP server.
func (*Server) AddAccount ¶
func (*Server) Addr ¶
Addr returns the local address of the server, or an empty string if the server hasn't been started yet.
func (*Server) Close ¶
func (srv *Server) Close()
Close stops the server, causing the accept loop to break out.
Click to show internal directories.
Click to hide internal directories.