CSocket

20/04/2004 - 18:04 por Iker Landajuela | Informe spam
Hola, estoy realizando una aplicacion cliente en Embedded Visual C++ basada
en CSocket, cuando intento enviar datos aparece la conexion en mi aplicacion
servidor pero no consigo mandar datos debido a un error de timeout (numero
10060), esto solo ocurre a veces, otra veces manda bien, pero el problema es
que cuando seproduce un error de timeout este error se reproduce en
sucesivos intentos y no consigo mandar nada, alguien podria orientarme por
favor?
gracias.
 

Leer las respuestas

#1 mohit9814
11/05/2004 - 08:29 | Informe spam
hi,
I am havin a tough time using Csocket class.
I'm tryin to create a Client and a Server using Csocket in a CONSOLE
app'n

SERVER App'n
-
class CListeningSocket:public CSocket
{
void CListeningSocket::OnAccept (int nErrorCode)
{
cout<<" Listenin Socket's OnAccept Function Called"<<endl; // does
not get triggered ?
CSocket::OnAccept(nErrorCode);
}

}

CListeningSocket ListeningSocket;

ListeningSocket.Create (PORT_NUMBER,SOCK_STREAM);
ListeningSocket.Listen ();

while(1)
{
Sleep(100); // wait for client to send ACCEPT notification
}
/////////////////

Also can u tell me how to find out whether the connectionis present or
not ( on Client OR Server side)

any suggections ?
thanx in advance...

Preguntas similares