How to detect HTTP connection break

How to detect HTTP connection break

Jump to: navigation, search

Many a times HTTP connection breaks due to some reasons. The connection may be WIFI or HTTP. Applications should be well equipped to catch these connection breaks. The HTTP Client source codes on ForumNokia comes along with the code to catch these connection breaks. The older version of this example missed this feature.

The CIAPConnectProgressNotifier class implements this.

iConnection.ProgressNotification(iProgress, iStatus);
SetActive();

if the connection breaks

void CIAPConnectProgressNotifier::RunL()

RunL will give the exact state of the connection.

Header File:

#include <Es_sock.h>

Link against:

LIBRARY  ESock.lib
posted @ 2011-09-22 10:50  zziss  阅读(317)  评论(0编辑  收藏  举报