Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Mar : Re: Socket Error # 0
| Subject: | Re: Socket Error # 0 |
| Posted by: | "Stephan Jaschke" (ne..@stj-software.de) |
| Date: | Thu, 22 Mar 2007 21:28:23 |
Remy Lebeau (TeamB) schrieb:
> Indy has its own GetMimeTypeFromFile() function for that same purpose.
Didn't know that. Thanks for the hint.
> If you are adding attachments to the message, then you need to place
> the text into a TIdText part instead.
[and a lot more ...]
Ok. Thanks for your help. I'll adjust the code.
But there's just one thing which I do not understand:
My code works just "fine", fine as far as my customer and their
recipients are concerned. So if even it's far from correct but working
code, on some machines, I cannot understand why my code is failing on
others.
Just to be clear: It works for days and hours and suddenly (means first
to 47th mail ok and 48th failed!) fails and will not work again, even
after a reboot.
I thought, maybe windows kind of "ran out of sockets" but this should
have been solved by a reboot.
Another thought was problems with ISP, maybe timeouts ore sth like this,
but it works fine on other machines.
Some other things were checked, lack of temp-space, disk full and so on.
All those weired things which may cause windows to fail - but nothing found.
After investigating Indys codebase there is just one line according
stacktrace which may cause it to fail:
IdTCPConnection, Line 752:
nByteCount := IOHandler.Send(PChar(LBuffer.Memory)[nPos - 1],
LBuffer.Size - nPos + 1);
Send must have returned Id_SOCKET_ERROR (SOCKET_ERROR) and
WSAGetLastError returns 0. But I see no explanaition for this situation
in the SDK docs.
Do you have some more insides I missed?
Stephan
--
Logik ist die Kunst, zuversichtlich in die Irre zu gehen.
Stephan Jaschke - EDV-Beratung und Softwareentwicklung
Mail: support@stj-software.de - ICQ: 361511624