Comments (9)
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.
Yes i am using callback handler OnSubmitError , but this handler not working when i turned off internet.
from gosmpp.
@qosimmax Oh it's weird, let me take a look later and tell you asap 🤔
from gosmpp.
@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.
@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.
@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.
thanks very much @linxGnu.
If i'm not mistaken value of ReadTimeout
must greater than EnquireLinkIntervalMinimum
(20 second).
Line 15 in 297995d
otherwise EnquireLinkResp handle not working.
from gosmpp.
@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.
I will close this issue. Thank you very much for your concern @qosimmax
from gosmpp.
Related Issues (20)
- PDU/Network error: EOF on receive ESME_RTHROTTLED in submit sm resp HOT 6
- multipart message with our udh HOT 1
- Delivery Receipt Parameters HOT 12
- Long messages in the latest version HOT 6
- Relating submitted message with message id HOT 12
- is there a way to set a custom uuid with a short message and receive the uuid in reply/delivered callbacks? HOT 2
- ShouldSplit and Split behaviour when encoding is GSM7Bit HOT 7
- RX connector not working. Receiver not recieving data HOT 1
- Identification of current session is running or not HOT 1
- Setup addressRange for binding with SMSC HOT 1
- Do we support inactivity timers in this library? HOT 4
- connection is closing, can not send PDU to SMSC HOT 9
- Reconnecting to SMPP Server HOT 1
- how can save command string in log? HOT 2
- Store and Forward mode Option HOT 1
- General question not an issue! are delivery receipts and error codes standard and same across the platform? HOT 2
- Opening the ShortMessage HOT 6
- Implementation Question: Is there a way to check an error while hitting submit_sm ?
- Not receiving optional Parameters even after assigning them in submit_sm. HOT 6
- It's possible send flash sms? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gosmpp.