aksonov / aksonov/react-native-xmpp

How do I know when a message has failed to reach the server?

Đang mở
#68 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Objective-C
Star
310
Fork
96
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Is there anyway to have a callback when I send a message?
Because I need to know whether the message reached the server or failed, otherwise I have to assume every message was delivered to the server even when there was an error. A good situation is clients with bad connections.

The current `onError(message)` function is never called if the user goes offline all of a sudden. And when it gets called sometimes, it just shows that "Server is not connected, please reconnect". It doesn't show which message failed. So if I sent many messages at once, and this function get called then I don't know from which message the fail started.

`onDisconnect(message)` as well doesn't get called right away when the user goes offline, at least if this was getting called I would have tried to monitor if the user is online before sending the message.

What can I do to know which messages failed and which ones reached the server successfully?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.