go-smpp
go-smpp copied to clipboard
SMPP server.
Nice, but I think we should keep the smpptest server separate from the smpp/server.go resembling the architecture of net/http. Plus the real server authentication must be slightly different from the smpptest one, and the smpp/server.go should not have default users or any handlers, just the API to glue it together.
I agree on not having default users/config. Is it necessary to also have smpptest if smpp/server.go can serve as a mocking endpoint? What do you mean but only the API? Wouldn't it need the logic of the server as handlers to serve the PDUs?
I think the types of control and functionality you'd want from the smpptest server is very different from a production server, hence the mention of net/http and net/http/httptest.
The one thing we could consider in this server, though, is the ability to have a default listener that supports graceful shutdown, if none of the http ones would serve for us - I think they might, can't recall the details.
As for the handlers, sure. All we need is a ServeMux type that can be used by both smpp and smpptest.