Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transceiver implementation #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ritmas
Copy link

@ritmas ritmas commented Jun 16, 2015

No description provided.

@cypres
Copy link
Contributor

cypres commented Jun 17, 2015

Hi @ritmas thanks for sharing your code.
As specified in SMPP 3.4 section 2.7, using transceiver mode is to enter a fully duplex messaging mode where messages are simultaneously sent and received on the socket.
This is a very different way of communicating compared our current mode, where we can send a reply and simply wait for response. We know that our response will come, and can do blocking reads for it until it arrives or times out. The only complication we deal with now, is that a enquire_link message might be waiting for us in the socket buffer when we read.
Doing transceiver, even in a synchronous way, means this entire mechanism would require reworking, also we have to deal with any messages that are received in a timely manner, for instance if a delivery report is received we have to deal with it before sending a lot of new messages to the SMSC, since we have to acknowledge the PDU.
Please read page 26-28 of the specs SMPP 3.4 carefully and let me know how this simple PR fares against it.

If you come up with a more complete implementation, and some way of testing it, I will be happy to accept a PR.

@ritmas
Copy link
Author

ritmas commented Jun 17, 2015

Well, the way I'm using transceiver for certain SMSC connections is enabling two sockets at the same time:

  1. for sending SMS, which is being opened and closed on-demand
  2. for reading inbound messages & delivery reports, persistent one

There's a chance I haven't fall into blocking-read situation yet, so I agree more info/tests are required.
Do you have any particular tool or SMS gateway in mind to use for emulating such transceiver specific scenarios?

Copy link

@Givemore Givemore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it did the trick for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants