fiorix / go-smpp

SMPP 3.4 Protocol for the Go programming language
MIT License
218 stars 135 forks source link

SMPP server. #16

Open vagruchi opened 8 years ago

vagruchi commented 8 years ago

There are realization in this repository Maybe you can use this.

fiorix commented 8 years ago

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.

cesarrodrig commented 8 years ago

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?

fiorix commented 8 years ago

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.

fiorix commented 8 years ago

As for the handlers, sure. All we need is a ServeMux type that can be used by both smpp and smpptest.