Re: [twsocket] FTP Put using streams

2008-04-21 Thread Ionut Muntean
Harold Holmes wrote:
 I have a bitmap in a timage and I'd like to send that image to the server
 without saving the file to the local harddrive first. Is it possible to use
 a stream to do this?

 Best regards,
 Harold
   
Yes, you can ...

[code]

ftp.hostname := 'your_host';
ftp.username := 'user';
ftp.password := 'password';
ftp.binary := true;
ftp.passive := true; // if u want passive ...
ftp.hostdirname := 'your/directory';
ftp.hostfilename := 'filename';
ftp.localstream := your_stream;
try
  ftp.transmit;
except
 on e: exception do
   { do your exception handling ... }
end;


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] bug in TCustomWSocket? - 100% cpu; continues calls to OnDataAvailable while no data was received

2008-04-21 Thread Merijn Bosma

I've removed the parsing and processing of data from the OnDataAvailable.
The event handler now basically contains ReceiveStr() and PostMessage().

I'm still having the same problem though :(
It seems that this problem is not triggered by doing something wrong in 
the OnDataAvailable event handler, but somewhere else.
I'm starting to think it's something in the sending of data since that 
keeps coming back in the callstack (see attached callstack).


Hoping someone can give me a hint.

Merijn
|--|
|7C810E31|kernel32.dll| |   
|WriteFile   | |
|7C90D590|ntdll.dll   | |   
|NtClose | |
|7C809BA5|kernel32.dll| |   
|CloseHandle | |
|7C809B67|kernel32.dll| |   
|CloseHandle | |
|006BF6B2|AviaVox.exe |ServerTimedSocket.pas|TServerTimedSocket 
|_Log|301[17]  |
|71AA150A|WS2HELP.dll | |   
|WahReferenceContextByHandle | |
|71AB4376|WS2_32.dll  | |   
|WSARecv | |
|71AB437D|WS2_32.dll  | |   
|WSARecv | |
|71AB4318|WS2_32.dll  | |   
|WSARecv | |
|71AD2E9E|wsock32.dll | |   
|recv| |
|005C569F|AviaVox.exe |WSocket.pas  |   
|WSocket_Synchronized_recv   |2277[3]  |
|005C6B00|AviaVox.exe |WSocket.pas  |TCustomWSocket 
|DoRecv  |3825[0]  |
|005CC772|AviaVox.exe |WSocket.pas  |TCustomSocksWSocket
|DoRecv  |6759[2]  |
|0055F9C4|AviaVox.exe |PostPone.pas |TPostPone  
|PostPone|80[1]|
|006BF84E|AviaVox.exe |ServerTimedSocket.pas|TServerTimedSocket 
|OnDataAvailable |333[20]  |
|71AB44E5|WS2_32.dll  | |   
|WSAIoctl| |
|71AB4489|WS2_32.dll  | |   
|WSAIoctl| |
|71AB4536|WS2_32.dll  | |   
|ioctlsocket | |
|005C5398|AviaVox.exe |WSocket.pas  |   
|WSocket_Synchronized_ioctlsocket|2136[3]  |
|005C5374|AviaVox.exe |WSocket.pas  |   
|WSocket_Synchronized_ioctlsocket|2133[0]  |
|005C7229|AviaVox.exe |WSocket.pas  |TCustomWSocket 
|ASyncReceive|4226[28] |
|7C80A424|kernel32.dll| |   
|CompareStringW  | |
|7C80A37E|kernel32.dll| |   
|CompareStringW  | |
|7C90D8ED|ntdll.dll   | |   
|NtDeviceIoControlFile   | |
|71AB42F5|WS2_32.dll  | |   
|send| |
|71AB42FC|WS2_32.dll  | |   
|send| |
|005C52E7|AviaVox.exe |WSocket.pas  |   
|WSocket_Synchronized_send   |2098[3]  |
|005C2808|AviaVox.exe |WSockBuf.pas |TBuffer
|Peek|212[0]   |
|005C6D8A|AviaVox.exe |WSocket.pas  |TCustomWSocket 
|TryToSend   |4006[16] |
|005C6F07|AviaVox.exe |WSocket.pas  |TCustomWSocket 
|TryToSend   |4070[80] |
|7E41CBB3|USER32.dll  | |   
|PostMessageA| |
|7E41CB69|USER32.dll  | |   
|PostMessageA| |
|005C710A|AviaVox.exe |WSocket.pas  |TCustomWSocket 
|Send|4164[31] |
|005C715A|AviaVox.exe |WSocket.pas  |TCustomWSocket 
|SendStr |4177[2]  |
|006BFA70|AviaVox.exe |ServerTimedSocket.pas|TServerTimedSocket