Re: recv how to
- From: Przemek <edgarus@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 12 Nov 2006 12:21:30 +0100
Arkady Frenkel napisał(a):
Hi!
"Przemek" <edgarus@xxxxxxxxxxxxxxxxxx> wrote in message news:ej5f7f$im0$1@xxxxxxxxxxxxxxxxxxxxxxxHi all,Continue to read up to you have all the data
Two things:
1.
I need to recieve an email header, and I need to do it in one thread,
I'm sending top command to server to get header but it's not complite.
Ok but how to do that? I've tried a microsoft example from msdn, and it freezes host application (I'm writting a plugin for internet communcator).
I've tried this:
while( bytesRecv != SOCKET_ERROR ) {
bytesRecv = recv( ConnectSocket, recvbuf, 32, 0 );
if ( bytesRecv == 0 || WSAGetLastError() == WSAECONNRESET ) {
printf( "Connection Closed.\n");
break;
}
printf( "Bytes Recv: %ld\n", bytesRecv );
}
In my app buffer has 2KB.
When I connect to pop3 server, and get messages count, and try to get first message, this code freezes my app. However when it try to get the second email, it's very fast. But at the fist time it gets no data.
The second thing is that, when my code is running, the host application has problem with network.
Przemek
.
- Follow-Ups:
- Re: recv how to
- From: Arkady Frenkel
- Re: recv how to
- References:
- recv how to
- From: Przemek
- Re: recv how to
- From: Arkady Frenkel
- recv how to
- Prev by Date: Re: Hardware Firewall with Dynamic port
- Next by Date: Re: Hardware Firewall with Dynamic port
- Previous by thread: Re: recv how to
- Next by thread: Re: recv how to
- Index(es):