Re: [twsocket] [QUESTION] THttpCli and SocketError
Hello Guillaume, of course change the WSocketServer I used (I just did a copy/paste from one of my code). GM Hi all, GM is there a way when, on ThttpCli.OnSocketError is triggered, to know what was the error ? GM i mean is it an error from TCP/IP stack, a system error (like no handle, etc...) GM Thanks, GM Regards, GM -- GM Guillaume MAISON - [EMAIL PROTECTED] GM 83, Cours Victor Hugo GM 47000 AGEN GM Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50 GM e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] [QUESTION] THttpCli and SocketError
Dod a écrit : Hello Guillaume, of course change the WSocketServer I used (I just did a copy/paste from one of my code). Thanks ! i'll check it when i test my application :) regards, -- Guillaume MAISON - [EMAIL PROTECTED] 83, Cours Victor Hugo 47000 AGEN Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50 e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] UDPServer receive and IP
Hello, I have a UDPServer component and on DataAvailable SrcLen := SizeOf(Src); Len:= UDPServer.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen); ShowMessage(inet_ntoa(Src.sin_addr)); // i know the IP address of the remote pc but since my computer contains 5 ip addresses in the interface, Im receiving the same UDP message 5 times. How can I know what is the IP Address of the local machine that is being read data? I tried UDPServer.Addr and LocalAddr but it always returns 0.0.0.0 UDPServer.PeerAddr crashes my program. I mean it never executes it. Thanks -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] UDPServer receive and IP
Try with GetXAddr method. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) http://www.overbyte.be - Original Message - From: George [EMAIL PROTECTED] To: twsocket@elists.org Sent: Friday, February 17, 2006 3:25 PM Subject: [twsocket] UDPServer receive and IP Hello, I have a UDPServer component and on DataAvailable SrcLen := SizeOf(Src); Len:= UDPServer.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen); ShowMessage(inet_ntoa(Src.sin_addr)); // i know the IP address of the remote pc but since my computer contains 5 ip addresses in the interface, Im receiving the same UDP message 5 times. How can I know what is the IP Address of the local machine that is being read data? I tried UDPServer.Addr and LocalAddr but it always returns 0.0.0.0 UDPServer.PeerAddr crashes my program. I mean it never executes it. Thanks -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] Bcc list - multiple users - problem with bad email adress
Hello! I am from Poland. This is my problem. Let's say that I send email to 100 people. They are in BCC list. For example: [EMAIL PROTECTED]; [EMAIL PROTECTED]; .. [EMAIL PROTECTED]; Mail is sending. But, suddenly I have an error message, that some emaill adresses are incorrect or doesn't exist anymore. So, if for example 44 adres from my bcc list is bad, that only 43 people will get email - the rest, starting from 44 will not, because a person with 44 number has bad email adress/ inactive email box/or something that caused error. So, please, can You tell me how to do that I can fix this problem? To send the rest emails, even if some adresses are incorrect... like for example Outlook Express can do (mail are sending to correct adresses, the rest (bad adress) are ignore, and eventually logged this bad adress, that user could fix this adresses). I could send this email to every person, individually, but it would take too long time... So, the best is sending it using bcc list. It would be great that I could log to file (or TMemo), that email has been send to each person on bcc list. For example: My bcc list looks like below: [EMAIL PROTECTED];[EMAIL PROTECTED]; ... [EMAIL PROTECTED] During sending the message to multiple users it would be logged to file (or TMemo) like this: 1. Sent to [EMAIL PROTECTED] 2. Sent to [EMAIL PROTECTED] ... 43. Sent to [EMAIL PROTECTED] 44. ERROR - Massage send failed... Adress: [EMAIL PROTECTED] ... n. Sent to [EMAIL PROTECTED] So, if some adress is bad, I would know about this and correct bcc list. But the most important is that bad adress in bcc list doesn't broke sending email to other users on this list. I hope You understad what I mean... Best regards. Ps: Sorry for my english... Paweł [EMAIL PROTECTED] -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] Problem with Thread(At/De)tach
Hello, I know I have brought this problem to your attention before but it persists and I think I have a clue. The problem has been: - MT - NOFORMS - Worker thread of http server clients is different than http server itself Now the clue is I recognized that there is window allocation/deallocation with every thread at/de-tach! So that could be the very reason why Arno could find the issue with many twsocket allocations deletions. I am SURE this is an ICS problem as the components give cannot create hidden window and there is no other application running! This happens with two of my applications. Could someone take a look? Best Regards, SZ -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Bcc list - multiple users - problem with bad email adress
Hi, There's an event OnRcptError that you can use to handle the situation, not sure if it is in current release or latest beta. procedure TForm1.SmtpClientRcptToError(Sender: TObject; ErrorCode: Word; RcptNameIdx: Integer; var Action: TSmtpRcptToErrorAction); begin end; Arno Garrels Pawel (WP) wrote: Hello! I am from Poland. This is my problem. Let's say that I send email to 100 people. They are in BCC list. For example: [EMAIL PROTECTED]; [EMAIL PROTECTED]; .. [EMAIL PROTECTED]; Mail is sending. But, suddenly I have an error message, that some emaill adresses are incorrect or doesn't exist anymore. So, if for example 44 adres from my bcc list is bad, that only 43 people will get email - the rest, starting from 44 will not, because a person with 44 number has bad email adress/ inactive email box/or something that caused error. So, please, can You tell me how to do that I can fix this problem? To send the rest emails, even if some adresses are incorrect... like for example Outlook Express can do (mail are sending to correct adresses, the rest (bad adress) are ignore, and eventually logged this bad adress, that user could fix this adresses). I could send this email to every person, individually, but it would take too long time... So, the best is sending it using bcc list. It would be great that I could log to file (or TMemo), that email has been send to each person on bcc list. For example: My bcc list looks like below: [EMAIL PROTECTED];[EMAIL PROTECTED]; ... [EMAIL PROTECTED] During sending the message to multiple users it would be logged to file (or TMemo) like this: 1. Sent to [EMAIL PROTECTED] 2. Sent to [EMAIL PROTECTED] ... 43. Sent to [EMAIL PROTECTED] 44. ERROR - Massage send failed... Adress: [EMAIL PROTECTED] ... n. Sent to [EMAIL PROTECTED] So, if some adress is bad, I would know about this and correct bcc list. But the most important is that bad adress in bcc list doesn't broke sending email to other users on this list. I hope You understad what I mean... Best regards. Ps: Sorry for my english... -- -- Pawel [EMAIL PROTECTED] -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] TWsocket in Threads and ShellExecute
Hello all! Does somebody have this problem: if twsocket is created in thread and the thread goes to suspend mode, than if you try to call i.e. explorer thru shellexecute, the whole applications hangs some minutes. I assume it has something todo with Window Handle Allocation in TWSocket, but not sure. As for my application, it's not essential, since I can find some alternatives to shellexecute. But! It's seems to be, that the shell operations of whole windows is blocked - and this is the problem. What I mean: i.e. if you try to click on url in an email, IE will not be started - in hangs, if you try to put your PC in standby mode - it hangs... etc. etc. You can, I hope, easily reproduce this behaviour i.e. with ftpthrd.dpr from ICS distribution. 1. Just add in procedure TTransferThread.Execute (ftpthrd1.pas) one line - see code below procedure TTransferThread.Execute; var FtpClient1 : TFtpClient; begin FtpClient1:= TFtpClient.Create(nil); // just add below line: Suspend; Suspend; 2. put one more button on the form and add shellapi to uses procedure TThrdFtpForm.Button1Click(Sender: TObject); begin ShellExecute(Application.Handle, 'explore', 'd:\', nil, nil, SW_SHOWNORMAL); end; 3. Click Start (FTPclient will be created, of course twsocket too) and than click on button which call shellexecute you will see what I described above. Thanks for any help best regards, A.Svetov -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TWsocket in Threads and ShellExecute
Hello asvetov, This is normal behaviour in windows. If you create a (hidden) window in a thread you must pump messages or your system can deadlock. If you suspend a thread having a window then it cannot pump, so that is what you experiance. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Friday, February 17, 2006, 19:36, asvetov wrote: Hello all! Does somebody have this problem: if twsocket is created in thread and the thread goes to suspend mode, than if you try to call i.e. explorer thru shellexecute, the whole applications hangs some minutes. I assume it has something todo with Window Handle Allocation in TWSocket, but not sure. As for my application, it's not essential, since I can find some alternatives to shellexecute. But! It's seems to be, that the shell operations of whole windows is blocked - and this is the problem. What I mean: i.e. if you try to click on url in an email, IE will not be started - in hangs, if you try to put your PC in standby mode - it hangs... etc. etc. You can, I hope, easily reproduce this behaviour i.e. with ftpthrd.dpr from ICS distribution. 1. Just add in procedure TTransferThread.Execute (ftpthrd1.pas) one line - see code below procedure TTransferThread.Execute; var FtpClient1 : TFtpClient; begin FtpClient1:= TFtpClient.Create(nil); // just add below line: Suspend; Suspend; 2. put one more button on the form and add shellapi to uses procedure TThrdFtpForm.Button1Click(Sender: TObject); begin ShellExecute(Application.Handle, 'explore', 'd:\', nil, nil, SW_SHOWNORMAL); end; 3. Click Start (FTPclient will be created, of course twsocket too) and than click on button which call shellexecute you will see what I described above. Thanks for any help best regards, A.Svetov -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TWsocket in Threads and ShellExecute
Hello, Wilfried! Thank you for clarifying this. Do you have any recommendations how to avoid this behaviour? I think many people works with different ICS components in threads and reuse threads (doing suspend/resume) and all they have this problem? Or I▓ am the only one who haven▓t solved this :) Best regards, A. Svetov Hello asvetov, This is normal behaviour in windows. If you create a (hidden) window in a thread you must pump messages or your system can deadlock. If you suspend a thread having a window then it cannot pump, so that is what you experiance. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be