Reliable Message Delievery XMPP

118 views Asked by At

In some of the cases server is not able to determine the state of the client at socket level, some of the time, user is not connected to the server because of connection drop the socket return success. Some of the message get drop, how can we overcome this issue.

Client c1 send message to Server S1 server send message to the Client2 c2, we can only determine the state of client connection on socket send if it returns success we can assume that the client is alive and the message has been successfully sent. However some time message get drop because the connection was no more and socket is not able to predict? how can overcome this problem.

socket m_Sock;
m_Sock.BeginSend(byteData, 0, byteData.Length, 0, out errCode, SendCallback, null

if error code is success we assume that the message has been successfully sent to this client how ever it does not notify immediately after the connection has been drop, after copule of seconds expected error code get return in this interval we lost messages

if(errCode == SocketError.Success)
0

There are 0 answers