Re: [twsocket] Midware create serverobject 'problem'.
Got the first server working now, so that is fine. :-) Despite of the demo's i see for ADO and BDE, i am using another database (absolutedatabase : www.componentace.com), which is a BDE replacement. Is this just as easy to connect as the examples that are included with Midware, or do i need to create my own 'BDE' serverobject? Yes, it is just as easy with any database component. Midware at server side is simply not concerned by the component you use. Use whatever you like ! And client side is completely independent of what you use at server side. Please not that many developer are falling in a frequent design error when dealing with multitier: they are transporting SQL request from client to server. This works of course but this is really not the design for 3-tier programming. Transporting SQL request is simple 2-tier (classical client/server). To really befenit from 3-Tier architecture, you have to think at a higher level. The client do not know anything about database, storage and similar topics. It only knows about high level concepts of curse much of these high level concept can be expressed as SQL request, but don't do it at client side ! All SQL must go to server side. The client must not know the database, the tables, fields and indexes ! It only knows things such as GetClient and how to pass parameters which refines the search, it knows about SaveDocument and send the document. The server know where and how the documents are stored and what has to be verifyed to accept a document. Best regards, -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- 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] SocketSpy to C++ Problem
Richard, I was looking over my project and see that the processmessages loop I said allows the program to complete successfully is enabled. To allow the error this needs to be commented out. It's at the end of WSocketServerClientConnect. I removed these lines. However it works (basically) with the changes posted in my previous message with latest ICSv7 and C++ Builder 2007. Tested with NNTP and HTTP (8 local clients). But since you use LineMode there's a problem with binary data because DataAvailable might not trigger when LineEnd is not received. Use LineMode only if the protocol is 100% line-based. There's also a bug with shutting down the local client. After a call to ShutDown(1) it is no longer allowed to send data, however there might be still data in component's send buffer, so in order to avoid a socket exception and to make sure the local client gets everything add a flag to your client class and handle event OnDataSent, something like: void __fastcall TSocketWin::ClientDataSent(TObject *Sender, WORD ErrCode) { [..] if (client-closeflag) client-Shutdown(1); } and void __fastcall TSocketWin::RemoteSessionClosed(TObject *Sender, WORD Error) { [..] if (client-AllSent) client-Shutdown(1); else client-closeflag = true; } -- Arno Garrels -- 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] FTPCli problem.
Hello Arno, Friday, January 21, 2011, 8:51:33 PM, you wrote: AG My first guess is that it is a server issue. The server has to send a AG response on the control socket, either success or failure. AG Or for some reason that response was sent however doesn't get thru? AG If you can get a RDP connection to user's PC you could install AG Wireshark and check that. I cannot access that computer. I gave that user login and password to my own FTP server and the result is the same - works in active mode well and hangs at the end of the passive transfer, when the file is completely uploaded. So the server is not to blame. Besides, I uploaded from the same program to HIS ftp server in passive mode and had no problems. Futhermore, I installed Windows XP to WMWARE and uploaded files from it, and it also uploaded OK. This is strange. PS: when the user runs the same program with ICS v5 component, it works on that problematic computer ALWAYS ok, i.e. it never hangs. AG Hmm, that's indeed strange, are you sure it's the same mode AG passive/active? Yes, I'm sure. The program uses presets so the settings are always the same. The user only replaces exe file. The old one works, the new one hangs. When the user replaces the old one back, it works again. The settings are the same. But I see there were a lot of structural changes between V5 and V7 (filenameschanged and some properties to FTP component added/removed). Can it be that there were some code changes between V5 and V7 that can cause this behavior? -- Best regards, Antolmailto:spama...@mail.ru -- 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] Midware create serverobject 'problem'.
Hi Francois, Well, you caught me there, as I was thinking the Tier-2 way as well. Now after reading your email I fully understand the idea behind the Midware. This will make life much easier for me as you can create as many different clients as you like, all just ask for items they need. The good thing is indeed that I don't care what the 'server' does, as long as it gets what it needs. What is perfect as well, is that in that case only server needs to be changed when things need to alter, and the client does not really need updating (unless new items to be displayed etc). Thank you for the reply, and explanation, Best regards, Ruud -Oorspronkelijk bericht- From: Francois PIETTE Sent: Sunday, January 23, 2011 8:59 AM To: ICS support mailing Subject: Re: [twsocket] Midware create serverobject 'problem'. Got the first server working now, so that is fine. :-) Despite of the demo's i see for ADO and BDE, i am using another database (absolutedatabase : www.componentace.com), which is a BDE replacement. Is this just as easy to connect as the examples that are included with Midware, or do i need to create my own 'BDE' serverobject? Yes, it is just as easy with any database component. Midware at server side is simply not concerned by the component you use. Use whatever you like ! And client side is completely independent of what you use at server side. Please not that many developer are falling in a frequent design error when dealing with multitier: they are transporting SQL request from client to server. This works of course but this is really not the design for 3-tier programming. Transporting SQL request is simple 2-tier (classical client/server). To really befenit from 3-Tier architecture, you have to think at a higher level. The client do not know anything about database, storage and similar topics. It only knows about high level concepts of curse much of these high level concept can be expressed as SQL request, but don't do it at client side ! All SQL must go to server side. The client must not know the database, the tables, fields and indexes ! It only knows things such as GetClient and how to pass parameters which refines the search, it knows about SaveDocument and send the document. The server know where and how the documents are stored and what has to be verifyed to accept a document. Best regards, -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- 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 -- 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] FTPCli problem.
Antol, We realy need a reproducible test case. I searched the source again but was not able to find a change that could lead to the problem. Double check that you use latest ICSv7 from: http://wiki.overbyte.be/wiki/index.php/ICS_Download My OverbyteIcsFtpCli.pas is V7.17 -- Arno Garrels Antol wrote: Hello Arno, Friday, January 21, 2011, 8:51:33 PM, you wrote: My first guess is that it is a server issue. The server has to send a response on the control socket, either success or failure. Or for some reason that response was sent however doesn't get thru? If you can get a RDP connection to user's PC you could install Wireshark and check that. I cannot access that computer. I gave that user login and password to my own FTP server and the result is the same - works in active mode well and hangs at the end of the passive transfer, when the file is completely uploaded. So the server is not to blame. Besides, I uploaded from the same program to HIS ftp server in passive mode and had no problems. Futhermore, I installed Windows XP to WMWARE and uploaded files from it, and it also uploaded OK. This is strange. PS: when the user runs the same program with ICS v5 component, it works on that problematic computer ALWAYS ok, i.e. it never hangs. Hmm, that's indeed strange, are you sure it's the same mode passive/active? Yes, I'm sure. The program uses presets so the settings are always the same. The user only replaces exe file. The old one works, the new one hangs. When the user replaces the old one back, it works again. The settings are the same. But I see there were a lot of structural changes between V5 and V7 (filenameschanged and some properties to FTP component added/removed). Can it be that there were some code changes between V5 and V7 that can cause this behavior? -- Best regards, Antolmailto:spama...@mail.ru -- 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] SocketSpy to C++ Problem
Hi Arno, -Original Message- From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On Behalf Of Arno Garrels Sent: Sunday, January 23, 2011 1:09 AM To: ICS support mailing Subject: Re: [twsocket] SocketSpy to C++ Problem Richard, I was looking over my project and see that the processmessages loop I said allows the program to complete successfully is enabled. To allow the error this needs to be commented out. It's at the end of WSocketServerClientConnect. I removed these lines. However it works (basically) with the changes posted in my previous message with latest ICSv7 and C++ Builder 2007. I'm not sure which changes you refer to. Do you mean not sending a banner? I've looked at the archives in case I missed a message. It looks like I didn't, but I'm not sure what you're referring to. I think I've somehow missed something. Tested with NNTP and HTTP (8 local clients). But since you use LineMode there's a problem with binary data because DataAvailable might not trigger when LineEnd is not received. Use LineMode only if the protocol is 100% line-based. My purpose for translating socketspy was to just get it working in C++. My intentions are to create a component that does what socketspy does, but it will be used strictly with NNTP. Sorry I didn't mention that. I know the logging to a richedit dramatically slows the redirection. That's just for testing. I want to build a simple NNTP proxy. However, I only need to intercept the POST command and then grab the message. I've done this and I've found it easy to accomplish. Do you think this slight variation of socketspy is actually useable, or do I need a more robust proxy? I was unable to find a NNTP proxy in Delphi/Cbuilder anywhere. I do like the simplicity of socketspy. I could build on it if I should need more in the future. There's also a bug with shutting down the local client. After a call to ShutDown(1) it is no longer allowed to send data, however there might be still data in component's send buffer, so in order to avoid a socket exception and to make sure the local client gets everything add a flag to your client class and handle event OnDataSent, something like: Thanks so much for this info, I'll sure fix that immediately. Richard void __fastcall TSocketWin::ClientDataSent(TObject *Sender, WORD ErrCode) { [..] if (client-closeflag) client-Shutdown(1); } and void __fastcall TSocketWin::RemoteSessionClosed(TObject *Sender, WORD Error) { [..] if (client-AllSent) client-Shutdown(1); else client-closeflag = true; } -- Arno Garrels -- 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 -- 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
[twsocket] ICS group on social networks LinkedIn and FaceBook
Hi ! Every ICS user is invited to be part of ICS-group on Linked-In. See http://www.linkedin.com/e/gis/136245 Why ? Just to have a little bit more visibility for everyone of us and for ICS. There is another one on FaceBook: http://www.facebook.com/pages/ICS-Internet-Component-Suite/39493622127 btw: You may also be part of Powered by Delphi group on Linked-In. http://www.linkedin.com/e/gis/48600 -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- 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] FTPCli problem.
Hello Arno, Sunday, January 23, 2011, 10:09:00 PM, you wrote: AG Antol, AG We realy need a reproducible test case. I searched the source AG again but was not able to find a change that could lead to the AG problem. Double check that you use latest ICSv7 from: AG http://wiki.overbyte.be/wiki/index.php/ICS_Download AG My OverbyteIcsFtpCli.pas is V7.17 No, it is V7.12. I downloaded it with this pack: Download ICS-V7 Distribution (October, 2010) http://www.overbyte.be/frame_index.html?redirTo=/products/ics.html Now I looked more carefully and found daily sources archive with 7.17. I'll try it and let you know if there are any changes. Additional info from the user: Note: 2.20 uses ICS5, 2.30 uses ICS7, TEM is The Evil Machine that doesn't work in passive mode. == Still, 2.20 in passive mode worked--and still works--from TEM but 2.30 in passive mode does not. That is most curious. Yes, routers are not very consistent, which I well understand. But, between 2.20 and 2.30 on TEM the router does not change nor does the operating system... only the software changes. Even stranger still is that passive mode was developed to resolve a NAT issue. Testing any particular router by using active and then passive mode, it would be more likely active mode would fail. (The TEM router is, by the way, an old D-Link DIR-624 which was sold in UK not US.) == -- Best regards, Antolmailto:spama...@mail.ru -- 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] FTPCli problem.
Hi Antol, I am using a ICS built ftp client which has been several times updated and worked very good. I don't know if this is any help but, I had problems with 2 different models of D-Link routers and had to change them because my app did work in everywhere else but not in the machines behind of D-Link routers. That was exactly the Passive mode problem I unfortunately don't remember the errors anymore. I believe you will be able to find the problem if you switch D-Link router with something else. -Original Message- From: Antol Sent: Monday, January 24, 2011 7:11 AM To: ICS support mailing Subject: Re: [twsocket] FTPCli problem. Hello Arno, Sunday, January 23, 2011, 10:09:00 PM, you wrote: AG Antol, AG We realy need a reproducible test case. I searched the source AG again but was not able to find a change that could lead to the AG problem. Double check that you use latest ICSv7 from: AG http://wiki.overbyte.be/wiki/index.php/ICS_Download AG My OverbyteIcsFtpCli.pas is V7.17 No, it is V7.12. I downloaded it with this pack: Download ICS-V7 Distribution (October, 2010) http://www.overbyte.be/frame_index.html?redirTo=/products/ics.html Now I looked more carefully and found daily sources archive with 7.17. I'll try it and let you know if there are any changes. Additional info from the user: Note: 2.20 uses ICS5, 2.30 uses ICS7, TEM is The Evil Machine that doesn't work in passive mode. == Still, 2.20 in passive mode worked--and still works--from TEM but 2.30 in passive mode does not. That is most curious. Yes, routers are not very consistent, which I well understand. But, between 2.20 and 2.30 on TEM the router does not change nor does the operating system... only the software changes. Even stranger still is that passive mode was developed to resolve a NAT issue. Testing any particular router by using active and then passive mode, it would be more likely active mode would fail. (The TEM router is, by the way, an old D-Link DIR-624 which was sold in UK not US.) == -- Best regards, Antolmailto:spama...@mail.ru -- 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 -- 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] FTPCli problem.
Antol, We realy need a reproducible test case. I searched the source again but was not able to find a change that could lead to the problem. Double check that you use latest ICSv7 from: http://wiki.overbyte.be/wiki/index.php/ICS_Download My OverbyteIcsFtpCli.pas is V7.17 No, it is V7.12. I downloaded it with this pack: Download ICS-V7 Distribution (October, 2010) http://www.overbyte.be/frame_index.html?redirTo=/products/ics.html Now I looked more carefully and found daily sources archive with 7.17. I'll try it and let you know if there are any changes. One big change in FtpCli V7.00 was increase of component's internal buffer size. I plan to commit my private change like below that allows to compile with different buffer sizes, for other reasons. Though the chance is low that the big buffers cause the problem, they might affect router behaviour, how knows? Add this change and define for instance FTPCLI_BUFFER_OLD in your project options to get back ICSV5 buffer sizes. Rebuild the project, a simple compile won't be enough. const // BLOCK_SIZE = 1460; { 1514 - TCP header size } {$IFDEF FTPCLI_BUFFER_OLD} FTP_SND_BUF_SIZE = 1460; { arno V7.18 } FTP_RCV_BUF_SIZE = 4096; { arno V7.18 } {$ELSE} {$IFDEF FTPCLI_BUFFER_SMALL} FTP_SND_BUF_SIZE = 8192; { arno V7.18 } FTP_RCV_BUF_SIZE = 8192; { arno V7.18 } {$ELSE} {$IFDEF FTPCLI_BUFFER_MEDIUM} FTP_SND_BUF_SIZE = 16384; { arno V7.18 } FTP_RCV_BUF_SIZE = 16384; { arno V7.18 } {$ELSE} FTP_SND_BUF_SIZE = 32768; { angus V7.00 increased from 1460 } FTP_RCV_BUF_SIZE = 32768; { angus V7.00 increased from 4096 } {$ENDIF} {$ENDIF} {$ENDIF} -- Arno Garrels Additional info from the user: Note: 2.20 uses ICS5, 2.30 uses ICS7, TEM is The Evil Machine that doesn't work in passive mode. == Still, 2.20 in passive mode worked--and still works--from TEM but 2.30 in passive mode does not. That is most curious. Yes, routers are not very consistent, which I well understand. But, between 2.20 and 2.30 on TEM the router does not change nor does the operating system... only the software changes. Even stranger still is that passive mode was developed to resolve a NAT issue. Testing any particular router by using active and then passive mode, it would be more likely active mode would fail. (The TEM router is, by the way, an old D-Link DIR-624 which was sold in UK not US.) == -- Best regards, Antolmailto:spama...@mail.ru -- 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] NNTP / SMTP / POP3 proxy/tunnel
I want to build a simple NNTP proxy. However, I only need to intercept the POST command and then grab the message. I've done this and I've found it easy to accomplish. Do you think this slight variation of socketspy is actually useable, or do I need a more robust proxy? I was unable to find a NNTP proxy in Delphi/Cbuilder anywhere. I do like the simplicity of socketspy. I could build on it if I should need more in the future. I wrote a SMTP/POP3 proxy server with HTTP tunnelling. You could use similar code in your NNTP proxy. Initially I wanted to implement NNTP the same way but had no time to do it yet. The goal of my application (OverbyteGateway and OverbyteGatewayServer as I named the beast) is to allow someone to use standard SMTP/POP3 client such as Windows Mail Client within an organization where only HTTP is allowed with the help of a second program running on another computer. Any computer or server is OK. I even use a dynamic IP by the way of DynDNS service. Instead of starting from SocketSpy I started at a higher level. I mean, SocketSpy works at the TCP level, not knowing anything about what is transported while the code I wrote understand SMTP and POP3 commands. This makes things easier as soon as you must intercept some specific command. When I said understand SMTP and POP3 commands, I don't mean complete command implementation. Since my proxy is mainly a tunnel, one side of the tunnel (client side) listen for POP3/SMTP commands, roughly decode it, encapsulate it into a HTTP request, send the the server side which in turn send it to the actual external SMTP/POP3 server. The code was fairly easy to write. Actually I implemented only the commands used by Windows Mail Client which I use. Other client program could require other commands altough it is likely not. I have not yet had time to publish this code. It probably need some cleaning and some commenting. Anyway, if you or someone else want it, I can build a zip file and email it. No waranty and no commitment to support it altough I will do my best to answer questions in twsocket mailing list. The license is almost the same as TWSocket: you can use it freely for whatever legal you want but you cannot claim you wrote the code. You must include a notice in your software (source code, about box and documentation) that you used my code, with clear reference to me and my website. And by the way, you can buy consulting or custom developement from me if you want me to customize that code for you, or private email support if you don't want to talk in public about your project. Email me for prices. -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -- 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