Hi friends...
kindly have a look into this code...
void CWebClientEngine::ServiceProviderMethodL()
{
//gConsole->Printf(_L("Starting!\n"));
TUint KTestPort=5000;
// KInetAddrLoop is a predefined Constant in in_sock.h represents 127.0.0.1
TInetAddr addr(KInetAddrLoop, KTestPort);
User::LeaveIfError(socketServ.Connect());
CleanupClosePushL(socketServ);//if function leaves ensure socket serv session closes
//Opens a socket by creating a new subsession to the socket server.
User::LeaveIfError(listener.Open(socketServ, KAfInet,KSockStream, KProtocolInetTcp));
User::LeaveIfError(listener.Bind(addr));// bind the client address
// the arg 1 represents only one socketconnection can wiat to make conn with ths listener
User::LeaveIfError(listener.Listen(2));// listen for response from the client,1 conn it accpts
blank.Open(socketServ);//open connection to the client
listener.Accept(blank, iStatus); // accept the connection from the remote client
}
void CWebClientEngine:: StartTask(){
TRequestStatus *status = &iStatus;
if(IsActive())User::RequestComplete(status,KErrNone);
ServiceProviderMethodL();
SetActive();
}
void CWebClientEngine:: RunL(){
TSockXfrLength dummyLength;
if(iStatus != KErrNone) User::Leave(KErrGeneral);// if error , leave
blank.RecvOneOrMore(uri, 0, iStatus, dummyLength);// now read i/p from the client
User::WaitForRequest(iStatus);// wiat while reading i/p
if(iStatus != KErrNone) User::Leave(KErrGeneral);// check if everything went well, else leave
IssueHTTPGetL(uri);
if(iStatus != KErrNone) User::Leave(KErrGeneral);
blank.Close();
listener.Close();
CleanupStack::Pop(&socketServ);
socketServ.Close();
StartTask();
}
void CWebClientEngine:oCancel(){
//Cancel();
}
TInt CWebClientEngine::RunError(TInt err){
return err;
}
for the first socket connection , the event was handled successfully(with invoking RunL())
for the next immediate connection, the listener doesn't listen
pls help me if any one gets the idea
thanks in advance,
dns

oCancel(){


