Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Mar : Re: FTP in Thread
| Subject: | Re: FTP in Thread |
| Posted by: | "sham" (shamre..@inspirationmatters.com) |
| Date: | Thu, 6 Apr 2006 13:20:31 |
Hi,
This is what I have done so far:
Simple server application which has a TidFTPServer component and a
OnStoreEvent that does a VStream := TFileStream(filename, fmCreate);
That is all.
Client App demo has no threads (taken them out) and loops 100 times and
sends files. I still get a readTimeOut on the client:
There are a number of threads running on the Server and two of them have the
stacks:
Thread 1 (on server)
TIdStackWindows.WSSelect(???,???,nil,???)
CheckIsReadable(4561208)
TIdSocketHandle.Readable(-2)
TIdIOHandlerSocket.Readable(???)
TIdTCPConnection.ReadFromStack(True,-2,True)
TIdTCPConnection.ReadLn(#$A,-1,16384)
TIdTCPServer.DoExecute($E24A38)
TIdPeerThread.Run
TIdThread.Execute
Thread 2 (on server)
TIdStackWindows.WSSelect(???,???,nil,???)
TIdSocketHandle.Select(???,4561208)
TIdServerIOHandlerSocket.Accept(1796,$E24718)
TIdListenerThread.Run
TIdThread.Execute
On the client the stack is:
(on client when time out occurs)
TIdTCPConnection.ReadFromStack(True,5000,True)
TIdTCPConnection.ReadLn(#$A,-1,16384)
TIdTCPConnection.ReadLnWait(2147483647)
TIdTCPConnection.GetInternalResponse
TIdTCPConnection.GetResponse((...))
TIdTCPConnection.SendCmd(???,???)
TIdFTP.SendPort($45A31C)
TIdFTP.InternalPut('STOR TestDemo5.dat-FS=11',$CF37D0,True)
TIdFTP.Put($CF37D0,'TestDemo5.dat-FS=11',False)
TForm1.Button1Click(???)
FTPSenderTest
I have upgraded to 9.0.18 but cannot go to 10 since it breaks some other
components.
We have got to the point where we are about to scrap indy.
Any help would be appreciated.
Sham.
Ps. I replaced the server with GuildFTP and there is no problem. So clearly
the problem is with the ftp server code.
"Martin James" <mjames_falcon@dial.pipex.com> wrote in message
news:4433fc08$1@newsgroups.borland.com...
>
> "sham" <shamresh@inspirationmatters.com> wrote in message
> news:4432690c$1@newsgroups.borland.com...
>> Yes, I am creating a thread and doing the put inside it.
>>
>> I have moved up the sleep to 50.
>>
>> I am not using the latest dev snapshot. I am using version 9.0.14.
>
> 9.0.14?
>
> I'm fairly sure that I've used this version before in threads without nay
> sleeps or other strangenesses. It worked fine. I'll try & make sure by
> looking through my old projects.
>
> Rgds,
> Martin