Giter Club home page Giter Club logo

Comments (9)

linxGnu avatar linxGnu commented on August 24, 2024

Hello @qosimmax , please kindly take a look at following test/sample code: https://github.com/linxGnu/gosmpp/blob/master/transceiver_test.go#L53-L73

  • You could detect submit failure or you could be notified when connection is closed
  • gosmpp will try to rebind connection whenever it could and won't tell you about connection fail. But as I mentioned above, you could detect submit failure via https://github.com/linxGnu/gosmpp/blob/master/transceiver_test.go#L56, it's your own callback to handle submit failure.

from gosmpp.

qosimmax avatar qosimmax commented on August 24, 2024

Yes i am using callback handler OnSubmitError , but this handler not working when i turned off internet.

from gosmpp.

linxGnu avatar linxGnu commented on August 24, 2024

@qosimmax Oh it's weird, let me take a look later and tell you asap 🤔

from gosmpp.

linxGnu avatar linxGnu commented on August 24, 2024

@qosimmax
I reran example at: https://github.com/linxGnu/gosmpp/tree/master/example

SMPP Client:

go run main.go

SMSC (at https://github.com/linxGnu/gosmpp/tree/master/example/smsc):

# compile and run smsc
sh run.sh

Sometime turn on/off SMSC, I saw following error raised from smpp client:

dial tcp 127.0.0.1:2775: connect: connection refused
Transmitter is closing. Can not send PDU to SMSC
Transmitter is closing. Can not send PDU to SMSC

In short:

  • SubmitError callbacked when you submit to SMSC but fail. I think in your case, SubmitSM success before turn off internet
  • You could check RebindingError callback. Since smpp client retry connect to SMSC automatically, when you turn off internet, it tries to rebind but failure.

Could you please check it again, maybe using RebindingError callback as the example

from gosmpp.

qosimmax avatar qosimmax commented on August 24, 2024

@linxGnu you run SMSC in the localhost.
When run smpp client and SMSC in same host (localhost) its works fine, problem is when connect to remote SMSC host.
Can you test smmp client with remote host(SMSC simulator) ?
https://melroselabs.com/services/smsc-simulator/

from gosmpp.

linxGnu avatar linxGnu commented on August 24, 2024

@qosimmax I could reproduce your concern and provide an update. Please kindly check the fix again with latest rc release.

tl;dr: it's go problem of detecting conn broken without specifying read/write deadline.

Thank you very much for using gosmpp and tell us your concern/issue.

from gosmpp.

qosimmax avatar qosimmax commented on August 24, 2024

thanks very much @linxGnu.
If i'm not mistaken value of ReadTimeout must greater than EnquireLinkIntervalMinimum (20 second).

EnquireLinkIntervalMinimum = 20 * time.Second

otherwise EnquireLinkResp handle not working.

from gosmpp.

linxGnu avatar linxGnu commented on August 24, 2024

@qosimmax Actually, we can't tell when EnquireLinkResp is returned from SMSC. Therefore, I don't think there is a mandatory condition like ReadTimeout >= EnquireLinkInterval.

So, I think I would like to give the choice to user. User should try with their own production environment

from gosmpp.

linxGnu avatar linxGnu commented on August 24, 2024

I will close this issue. Thank you very much for your concern @qosimmax

from gosmpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.