Re: [twsocket] TWSocket Digest, Vol 154, Issue 8
> > Hello Markus, > >> This is done because each thread does more things than just sending >> receiving. > > The message was meant because many people think they need a thread per > communication TWSocket channel. So I assume you have your own reason to > have a thread. > > What you can do is Create and destroy TWSocket IN the Execute method of > the thread (and set multithreaded to True). the only thing esle you have > to do is call the message pump (your own written of one of TWSocket). > > The other thing is use ThreadAttache and Detach to attach the TWSocket > to the thread after create in another thread. This also have to be done > in the right thread context. (also Multithreaded True). > > At the moment your TWSockets are running in main thread context because > none of the above is true. > > Another thing you can do is leave all sockets in main thread (or in a > single thread) and exchange data by posting messages to the threads. > What the most logical is that is your own opinion and by design of > course. > Hello, thanks for clarification. It doesn't matter that the one thread which communicates via TWSocket doesn't reside in the same DLL as the TWSocket created? I simply don't have access to the TWSocket itsself from that thread. Another thing is, that the other DLL which normally only exposes procedures/functions for setting up a connection and for writing (receiving is done via callback mechanism) has one single thread for all components/sockets living there who only sits there and processes the Windows messages for them. Up to now this did work and after introducing it all other components startet to fire their requests again. So I am on a doable way as long as I get the closing of the socket done without hanging or crashing anything. The hints given by Francois this afternoon still have to be tested by me, but I hope those solve the problem with the hanging when closing (but later the app. responds again... mh...). Greetings Markus -- 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] Problems with TWSocket.close and DLL
> >> Humm, Markus wrote: > >>> The dll using that communication dll has one thread per socket > >>> (max. at most 10). Freing the socket is requested by this dll > >>> when it's execute method terminates. > >> > >> And the socket has been _created in method execute as well? > >> How do you achieve that client sockets run in the client thread > >> if not using ThreadAttach/ThreadDetach? > >> > > > > Hm, no it is created before execute. And no thread > attach/detach is used. > > If so, your sockets are never executed in the other > thread-context, but all > in the listener-thread. > > > It works so far until the point when I try to close it. > > Yes because you don't need threads with ICS :) you can easily exchange > data with multiple concurent at the same time. Yes I can, I know. But that doesn't multiply my capacity for simultaniously processing the packets. I split it up into this threaded scenario because data processing of the data sent and received might get lengthy. Esp. on the layers sitting above that. Greetings Markus -- 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] RasDial disconnect event
Wilfried Mestdagh wrote: > Hello Francois, > > I need to make a datacall server with Ras dial up. So I take your > RadDial as example. Works fine, only thing is that RASCS_Disconnected is > never fired. It does not fire in your example eather. > I'm testing it in winXP pro SP2. > > Maybe it does not matter becuase it seems RasHangupA is synchronious (it > tatke a short while for it to return so that's wy I think. > > But how do I get on an error string (if any) if the disconnect is not > fired ? This is what M$ says concerning notification: "Notifications end when one of the following events occurs: The connection is established. In other words, the RAS connection state is RASCS_Connected. The connection fails. In other words, dwError is nonzero. RasHangUp is called on the connection. " So it seems to be quite normal. Arno > -- > Rgds, Wilfried > 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
Re: [twsocket] Clarification on asynchronus and threads
Markus Humm wrote: > Hello, > > given a program which uses several sockets for several connections > simultaniously. The responses from these connections (assume a 100 BMit > LAN and about 10 connections) occur assynchronically, all sockets have > been created by the main program. > > What if one of these sockets has lengthy things to do in its receive > handler? > Does it block all others because all have been created in the > same thread? If a lengthy operation is blocking yes, it will block the other sockets in the same thread as well. An operation is blocking if no messages are being processed while it executes. But, for instance 10 instances of Twsocket can download or upload each a 100 MB file at the same time. Means for socket i/o threads are not necessary but if you want to sleep ;) or maybe execute a lengthy SQL put that stuff in a thread and then send the result when the thread has finished. > or do these events still occur to the other sockets as > well, enabling them to do also lengthy processing? (means do they really > run in paralell independant from each others?) > > Greetings > > Markus -- 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] Clarification on asynchronus and threads
- Original Message - From: "Markus Humm" <[EMAIL PROTECTED]> To: Sent: Wednesday, February 01, 2006 6:41 PM Subject: [twsocket] Clarification on asynchronus and threads > Hello, > > given a program which uses several sockets for several connections > simultaniously. The responses from these connections (assume a 100 BMit > LAN and about 10 connections) occur assynchronically, all sockets have > been created by the main program. > > What if one of these sockets has lengthy things to do in its receive > handler? Does it block all others because all have been created in the > same thread? or do these events still occur to the other sockets as > well, enabling them to do also lengthy processing? (means do they really > run in paralell independant from each others?) > > Greetings > > Markus While you are in the receive handler, other events cant be triggered for other sockets because no message pump is running. You should keep your event handlers speedy, or if if you cant, move the processing to another thread. Dan -- 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] Clarification on asynchronus and threads
Hello, given a program which uses several sockets for several connections simultaniously. The responses from these connections (assume a 100 BMit LAN and about 10 connections) occur assynchronically, all sockets have been created by the main program. What if one of these sockets has lengthy things to do in its receive handler? Does it block all others because all have been created in the same thread? or do these events still occur to the other sockets as well, enabling them to do also lengthy processing? (means do they really run in paralell independant from each others?) Greetings Markus -- 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] Problems with TWSocket.close and DLL
> > > And the socket has been _created in method execute as well? > > > How do you achieve that client sockets run in the client thread > > > if not using ThreadAttach/ThreadDetach? > > Hm, no it is created before execute. And no thread attach/detach is used. > > It works so far until the point when I try to close it. > This means you don't need a thread for your socket. > Since you have not created the component in the thread's context and you have > not attached it, you > thread is _not_ used for the component event. It is the thread having created > the component which > handle the component events, unless you use ThreadAttach. > Of course, your program is likely to crash because doing as you have done, > you have two threads > simultaneously refering to the same component. You must be sure to use > critical sections and the > likes to protect everything shared between your threads. > Probably the problem you experience when closing the socket is a result of > this thread mess ! These sockets mentioned by me are for sending only. Receiving is done by one central socket for all connections, which works because traffic etc. is not a problem. Okay some of that things are this way because I didn't understand all concepts when initially building this DLL, but I didn't have much time back then. The question is, how should the DLL sitting on top of my communication dll use thread attach? It has no access to the socket whatever, it only has init_communication, close_communication and send. All work with a handle (integer) the communication dlls assigns a new connection within init_connection. How can I solve my problem? Which thread does the socket belon to now? Does it belong to the thread in the dll sitting on top of my communication dll? If yes, why does closing that socket within the execute method of this thread problems? Is it because the socket might have been created by that dll but within another context? If created from the same thread and destroyed by the same thread there would be no problem? Greetings from a puzzled Markus -- 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] Image transfer with TFtpClient
Fabio Defferrari wrote: > Hi, Arno > > Many thanks, it worked out fine. Since smaller images were sent perfectly, I > didn't think the problem was with Binary mode (and also because I thought > that > just setting Binary property to True would work...) The problem was, I would guess, that the longer the file, the more chances there are that a byte will have the value of a newline character and misrepresented by the receiving server when stored locally. dZ. -- 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] Image transfer with TFtpClient
Hi, Arno Many thanks, it worked out fine. Since smaller images were sent perfectly, I didn't think the problem was with Binary mode (and also because I thought that just setting Binary property to True would work...) Thanks again, Fábio > Fabio Defferrari wrote: > > No, I'm setting Binary property do True before connecting and > > sending the file. > > You must set it explizitly when connected to the server. > i.e. FtpClient1.TypeBinaryAsync; > > Arno > > > Fábio > > > > > >> Did you run TypeSet() for changing into the binary mode? > >> > >> Regards, > >> > >> SZ > >> > >> - Original Message - > >> From: "Fabio Defferrari" <[EMAIL PROTECTED]> > >> To: "ICS support mailing" > >> Sent: Wednesday, February 01, 2006 3:52 PM > >> Subject: Re: [twsocket] Image transfer with TFtpClient > >> > >> > >> Hi, Fran?ois > >> > >> Same problem. I just recompiled the project using the latest ICS > >> beta and tried sending the file again. Do you want the files so you > >> can check it out? > >> > >> Regards, > >> > >> F bio > >> > >> > >>> Please try with latest ICS beta available from my website. This > >>> beta version contains all the fixes since last release. > >>> > >>> -- > >>> 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: "Fabio Defferrari" <[EMAIL PROTECTED]> > >>> To: > >>> Sent: Wednesday, February 01, 2006 11:38 AM > >>> Subject: [twsocket] Image transfer with TFtpClient > >>> > >>> > Hello, > > I'm using TFtpClient to put JPG image files on a FTP server. The > problem is that with images smaller than 160/170 Kb, it works > fine, but larger images are not sent correctly. The file itself > seems not to be corrupted, but the image (a picture, in this > case) is not sent completely. > > I already tried using the demo application which comes with ICS, > and the problem happens there too (binary transfer is on). With > other FTP applications the file is sent correctly (so the problem > is not on server side, or even on the Internet link). > > Do you have idea? I can send you the image file, so you can see > what I'm talking about. > > Thanks in advance, > > F bio Defferrari > > >> > >> --- > >> F bio Defferrari E-mail: [EMAIL PROTECTED] Defferrari Inform > >> tica Ltda. Novo Hamburgo - RS - Brasil Telefone/Fax: 51 3594-2270 > >> Home-page: www.defferrari.com.br > >> --- > >> > >> -- > >> 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 > > > > > > --- > > Fábio Defferrari E-mail: [EMAIL PROTECTED] Defferrari > > Informática Ltda. Novo Hamburgo - RS - Brasil Telefone/Fax: 51 > > 3594-2270 Home-page: www.defferrari.com.br > > --- > -- > 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 --- Fábio Defferrari E-mail: [EMAIL PROTECTED] Defferrari Informática Ltda. Novo Hamburgo - RS - Brasil Telefone/Fax: 51 3594-2270 Home-page: www.defferrari.com.br --- -- 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] Image transfer with TFtpClient
> > Did you run TypeSet() for changing into the binary mode? > No, I'm setting Binary property do True before connecting and sending the > file. You must call TypeSet to send the binary transfer type command to the server ! -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) 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
Re: [twsocket] RasDial disconnect event
On 2/1/2006 9:06:04 AM, in the email about Re: [twsocket] RasDial disconnect event, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote: > Hello Francois, > > > Sorry, no idea. Too long since I played with RAS API ! > > No problem. If I find something I let you know. Found something else > strange also. Also it is with original demo program. I did a research on disconnection problem long time ago, and the only way to monitor it is by using timer. -- Pande -- 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] Image transfer with TFtpClient
Fabio Defferrari wrote: > No, I'm setting Binary property do True before connecting and sending the > file. You must set it explizitly when connected to the server. i.e. FtpClient1.TypeBinaryAsync; Arno > Fábio > > >> Did you run TypeSet() for changing into the binary mode? >> >> Regards, >> >> SZ >> >> - Original Message - >> From: "Fabio Defferrari" <[EMAIL PROTECTED]> >> To: "ICS support mailing" >> Sent: Wednesday, February 01, 2006 3:52 PM >> Subject: Re: [twsocket] Image transfer with TFtpClient >> >> >> Hi, Fran?ois >> >> Same problem. I just recompiled the project using the latest ICS beta >> and tried sending the file again. Do you want the files so you can >> check it out? >> >> Regards, >> >> F bio >> >> >>> Please try with latest ICS beta available from my website. This beta >>> version contains all the fixes since last release. >>> >>> -- >>> 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: "Fabio Defferrari" <[EMAIL PROTECTED]> >>> To: >>> Sent: Wednesday, February 01, 2006 11:38 AM >>> Subject: [twsocket] Image transfer with TFtpClient >>> >>> Hello, I'm using TFtpClient to put JPG image files on a FTP server. The problem is that with images smaller than 160/170 Kb, it works fine, but larger images are not sent correctly. The file itself seems not to be corrupted, but the image (a picture, in this case) is not sent completely. I already tried using the demo application which comes with ICS, and the problem happens there too (binary transfer is on). With other FTP applications the file is sent correctly (so the problem is not on server side, or even on the Internet link). Do you have idea? I can send you the image file, so you can see what I'm talking about. Thanks in advance, F bio Defferrari >> >> --- >> F bio Defferrari E-mail: [EMAIL PROTECTED] Defferrari >> Inform tica Ltda. Novo Hamburgo - RS - Brasil Telefone/Fax: 51 >> 3594-2270 Home-page: www.defferrari.com.br >> --- >> >> -- >> 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 > > > --- > Fábio Defferrari > E-mail: [EMAIL PROTECTED] > Defferrari Informática Ltda. > Novo Hamburgo - RS - Brasil > Telefone/Fax: 51 3594-2270 > Home-page: www.defferrari.com.br > --- -- 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] Problems with TWSocket.close and DLL
Hello Markus, > This is done because each thread does more things than just sending > receiving. The message was meant because many people think they need a thread per communication TWSocket channel. So I assume you have your own reason to have a thread. What you can do is Create and destroy TWSocket IN the Execute method of the thread (and set multithreaded to True). the only thing esle you have to do is call the message pump (your own written of one of TWSocket). The other thing is use ThreadAttache and Detach to attach the TWSocket to the thread after create in another thread. This also have to be done in the right thread context. (also Multithreaded True). At the moment your TWSockets are running in main thread context because none of the above is true. Another thing you can do is leave all sockets in main thread (or in a single thread) and exchange data by posting messages to the threads. What the most logical is that is your own opinion and by design of course. --- 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
Re: [twsocket] Image transfer with TFtpClient
No, I'm setting Binary property do True before connecting and sending the file. Fábio > Did you run TypeSet() for changing into the binary mode? > > Regards, > > SZ > > - Original Message - > From: "Fabio Defferrari" <[EMAIL PROTECTED]> > To: "ICS support mailing" > Sent: Wednesday, February 01, 2006 3:52 PM > Subject: Re: [twsocket] Image transfer with TFtpClient > > > Hi, Franois > > Same problem. I just recompiled the project using the latest ICS beta > and tried sending the file again. Do you want the files so you can > check it out? > > Regards, > > F bio > > > > Please try with latest ICS beta available from my website. This beta > > version contains all the fixes since last release. > > > > -- > > 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: "Fabio Defferrari" <[EMAIL PROTECTED]> > > To: > > Sent: Wednesday, February 01, 2006 11:38 AM > > Subject: [twsocket] Image transfer with TFtpClient > > > > > > > Hello, > > > > > > I'm using TFtpClient to put JPG image files on a FTP server. The > > > problem is that with images smaller than 160/170 Kb, it works > > > fine, but larger images are not sent correctly. The file itself > > > seems not to be corrupted, but the image (a picture, in this case) > > > is not sent completely. > > > > > > I already tried using the demo application which comes with ICS, > > > and the problem happens there too (binary transfer is on). With > > > other FTP applications the file is sent correctly (so the problem > > > is not on server side, or even on the Internet link). > > > > > > Do you have idea? I can send you the image file, so you can see > > > what I'm talking about. > > > > > > Thanks in advance, > > > > > > F bio Defferrari > > > > > --- > F bio Defferrari E-mail: [EMAIL PROTECTED] Defferrari > Inform tica Ltda. Novo Hamburgo - RS - Brasil Telefone/Fax: 51 > 3594-2270 Home-page: www.defferrari.com.br > --- > > -- > 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 --- Fábio Defferrari E-mail: [EMAIL PROTECTED] Defferrari Informática Ltda. Novo Hamburgo - RS - Brasil Telefone/Fax: 51 3594-2270 Home-page: www.defferrari.com.br --- -- 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] RasDial disconnect event
Hello Francois, > Sorry, no idea. Too long since I played with RAS API ! No problem. If I find something I let you know. Found something else strange also. Also it is with original demo program. - dial connection with PPP Deamon - connect socket client with tcp server listening on other side - (note) - close PPP client - re open PPP client -- socket does not wants to connect anymore (IP routes are OK) - close PPP client - re open PPP client -- socket can connect again (note) Only if I close the tcp connection before closing PPP. then the socket will connect again after re etablishing PPP connection. Maybe this and the other thing is both an XP issue. When Im ready I try on w2k and on NT4 and let you know also. --- 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
Re: [twsocket] Image transfer with TFtpClient
Did you run TypeSet() for changing into the binary mode? Regards, SZ - Original Message - From: "Fabio Defferrari" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Wednesday, February 01, 2006 3:52 PM Subject: Re: [twsocket] Image transfer with TFtpClient Hi, François Same problem. I just recompiled the project using the latest ICS beta and tried sending the file again. Do you want the files so you can check it out? Regards, Fábio > Please try with latest ICS beta available from my website. This beta > version contains all the fixes since last release. > > -- > 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: "Fabio Defferrari" <[EMAIL PROTECTED]> > To: > Sent: Wednesday, February 01, 2006 11:38 AM > Subject: [twsocket] Image transfer with TFtpClient > > > > Hello, > > > > I'm using TFtpClient to put JPG image files on a FTP server. The > > problem is that with images smaller than 160/170 Kb, it works fine, > > but larger images are not sent correctly. The file itself seems not > > to be corrupted, but the image (a picture, in this case) is not sent > > completely. > > > > I already tried using the demo application which comes with ICS, and > > the problem happens there too (binary transfer is on). With other > > FTP applications the file is sent correctly (so the problem is not > > on server side, or even on the Internet link). > > > > Do you have idea? I can send you the image file, so you can see what > > I'm talking about. > > > > Thanks in advance, > > > > Fábio Defferrari > > --- Fábio Defferrari E-mail: [EMAIL PROTECTED] Defferrari Informática Ltda. Novo Hamburgo - RS - Brasil Telefone/Fax: 51 3594-2270 Home-page: www.defferrari.com.br --- -- 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
Re: [twsocket] Image transfer with TFtpClient
Hi, François Same problem. I just recompiled the project using the latest ICS beta and tried sending the file again. Do you want the files so you can check it out? Regards, Fábio > Please try with latest ICS beta available from my website. This beta > version contains all the fixes since last release. > > -- > 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: "Fabio Defferrari" <[EMAIL PROTECTED]> > To: > Sent: Wednesday, February 01, 2006 11:38 AM > Subject: [twsocket] Image transfer with TFtpClient > > > > Hello, > > > > I'm using TFtpClient to put JPG image files on a FTP server. The > > problem is that with images smaller than 160/170 Kb, it works fine, > > but larger images are not sent correctly. The file itself seems not > > to be corrupted, but the image (a picture, in this case) is not sent > > completely. > > > > I already tried using the demo application which comes with ICS, and > > the problem happens there too (binary transfer is on). With other > > FTP applications the file is sent correctly (so the problem is not > > on server side, or even on the Internet link). > > > > Do you have idea? I can send you the image file, so you can see what > > I'm talking about. > > > > Thanks in advance, > > > > Fábio Defferrari > > --- Fábio Defferrari E-mail: [EMAIL PROTECTED] Defferrari Informática Ltda. Novo Hamburgo - RS - Brasil Telefone/Fax: 51 3594-2270 Home-page: www.defferrari.com.br --- -- 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] Problems with TWSocket.close and DLL
> > And the socket has been _created in method execute as well? > > How do you achieve that client sockets run in the client thread > > if not using ThreadAttach/ThreadDetach? > Hm, no it is created before execute. And no thread attach/detach is used. > It works so far until the point when I try to close it. This means you don't need a thread for your socket. Since you have not created the component in the thread's context and you have not attached it, you thread is _not_ used for the component event. It is the thread having created the component which handle the component events, unless you use ThreadAttach. Of course, your program is likely to crash because doing as you have done, you have two threads simultaneously refering to the same component. You must be sure to use critical sections and the likes to protect everything shared between your threads. Probably the problem you experience when closing the socket is a result of this thread mess ! -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) 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
Re: [twsocket] Problems with TWSocket.close and DLL
Humm, Markus wrote: >> -Ursprüngliche Nachricht- >> Von: Arno Garrels [mailto:[EMAIL PROTECTED] >> Gesendet: Mittwoch, 1. Februar 2006 12:10 >> An: ICS support mailing >> Betreff: Re: [twsocket] Problems with TWSocket.close and DLL >> >> >> Humm, Markus wrote: >>> The dll using that communication dll has one thread per socket >>> (max. at most 10). Freing the socket is requested by this dll >>> when it's execute method terminates. >> >> And the socket has been _created in method execute as well? >> How do you achieve that client sockets run in the client thread >> if not using ThreadAttach/ThreadDetach? >> > > Hm, no it is created before execute. And no thread attach/detach is used. If so, your sockets are never executed in the other thread-context, but all in the listener-thread. > It works so far until the point when I try to close it. Yes because you don't need threads with ICS :) you can easily exchange data with multiple concurent at the same time. Arno > > Greetings > > Markus -- 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] Problems with TWSocket.close and DLL
> -Ursprüngliche Nachricht- > Von: Arno Garrels [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 1. Februar 2006 12:10 > An: ICS support mailing > Betreff: Re: [twsocket] Problems with TWSocket.close and DLL > > > Humm, Markus wrote: > > The dll using that communication dll has one thread per socket > > (max. at most 10). Freing the socket is requested by this dll > > when it's execute method terminates. > > And the socket has been _created in method execute as well? > How do you achieve that client sockets run in the client thread > if not using ThreadAttach/ThreadDetach? > Hm, no it is created before execute. And no thread attach/detach is used. It works so far until the point when I try to close it. Greetings Markus -- 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] Problems with TWSocket.close and DLL
> -Ursprungliche Nachricht- > Von: Dod [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 1. Februar 2006 12:02 > An: ICS support mailing > Betreff: Re: [twsocket] Problems with TWSocket.close and DLL > > > Hello Markus, > > Why do you use one thread per socket ? TSWocket is event driven so you > can connect to 500 servers if you want within same thread. > > For polling messages, if you .mulithread:=true then the TWSocket will > create its own message queue. This is done because each thread does more things than just sending receiving. Each thread also does packet handling of our own protocoll. Each logical connection represented by a thread and a socket) corresponds to a physical connection. (ethernet cable from the switch behind the NIC on). Greetings Markus -- 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] Image transfer with TFtpClient
Please try with latest ICS beta available from my website. This beta version contains all the fixes since last release. -- 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: "Fabio Defferrari" <[EMAIL PROTECTED]> To: Sent: Wednesday, February 01, 2006 11:38 AM Subject: [twsocket] Image transfer with TFtpClient > Hello, > > I'm using TFtpClient to put JPG image files on a FTP server. The problem is > that > with images smaller than 160/170 Kb, it works fine, but larger images are not > sent correctly. The file itself seems not to be corrupted, but the image (a > picture, in this case) is not sent completely. > > I already tried using the demo application which comes with ICS, and the > problem > happens there too (binary transfer is on). With other FTP applications the > file > is sent correctly (so the problem is not on server side, or even on the > Internet > link). > > Do you have idea? I can send you the image file, so you can see what I'm > talking > about. > > Thanks in advance, > > Fábio Defferrari > > > --- > Fábio Defferrari > E-mail: [EMAIL PROTECTED] > Defferrari Informática Ltda. > Novo Hamburgo - RS - Brasil > Telefone/Fax: 51 3594-2270 > Home-page: www.defferrari.com.br > --- > > -- > 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
Re: [twsocket] Problems with TWSocket.close and DLL
> TWSocket.close; > TWSocket.Free; > > is okay to terminate and release it? A gracefull close is nomally done by calling Shutdown. Then when OnSessionClosed event is fired, you can call Release to terminate the closing and free the component. OnSessionClosed event is fired when the remote socket agree to terminate the session. If it doesn't after some time, you should call Abort. -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: "Humm, Markus" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Wednesday, February 01, 2006 11:45 AM Subject: Re: [twsocket] Problems with TWSocket.close and DLL > Hello, > > to the socket hanging on close. > There are different threads involved. > > The communication dll has one thread which only polls messages. > That one shouldn't be the problem. > > The dll using that communication dll has one thread per socket > (max. at most 10). Freing the socket is requested by this dll > when it's execute method terminates. > > So I don't think I need threadattach in the communication > dll. Shared Mem is not used because so Strings are used. All params > passed between these dlls are either numbers or pchars (which get copied to > strings internally). > > So whare's the problem with my approach? Only TWSocket.close seems to hang. > I will test a bit more now, maybe I find a solution but I don't know > what causes the hang. But normally the sequence > TWSocket.close; > TWSocket.Free; > > is okay to terminate and release it? > > Greetings > > Markus > -- > 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
Re: [twsocket] Problems with TWSocket.close and DLL
Humm, Markus wrote: > The dll using that communication dll has one thread per socket > (max. at most 10). Freing the socket is requested by this dll > when it's execute method terminates. And the socket has been _created in method execute as well? How do you achieve that client sockets run in the client thread if not using ThreadAttach/ThreadDetach? Arno > > So I don't think I need threadattach in the communication > dll. Shared Mem is not used because so Strings are used. All params > passed between these dlls are either numbers or pchars (which get copied > to strings internally). > > So whare's the problem with my approach? Only TWSocket.close seems to > hang. I will test a bit more now, maybe I find a solution but I don't know > what causes the hang. But normally the sequence > TWSocket.close; > TWSocket.Free; > > is okay to terminate and release it? > > Greetings > > Markus -- 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] Problems with TWSocket.close and DLL
Hello Markus, Why do you use one thread per socket ? TSWocket is event driven so you can connect to 500 servers if you want within same thread. For polling messages, if you .mulithread:=true then the TWSocket will create its own message queue. HM> Hello, HM> to the socket hanging on close. HM> There are different threads involved. HM> The communication dll has one thread which only polls messages. HM> That one shouldn't be the problem. HM> The dll using that communication dll has one thread per socket HM> (max. at most 10). Freing the socket is requested by this dll HM> when it's execute method terminates. HM> So I don't think I need threadattach in the communication HM> dll. Shared Mem is not used because so Strings are used. All params HM> passed between these dlls are either numbers or pchars (which get copied to HM> strings internally). HM> So whare's the problem with my approach? Only TWSocket.close seems to hang. HM> I will test a bit more now, maybe I find a solution but I don't know HM> what causes the hang. But normally the sequence HM> TWSocket.close; HM> TWSocket.Free; HM> is okay to terminate and release it? HM> Greetings HM> Markus -- 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] Problems with TWSocket.close and DLL
Hello, to the socket hanging on close. There are different threads involved. The communication dll has one thread which only polls messages. That one shouldn't be the problem. The dll using that communication dll has one thread per socket (max. at most 10). Freing the socket is requested by this dll when it's execute method terminates. So I don't think I need threadattach in the communication dll. Shared Mem is not used because so Strings are used. All params passed between these dlls are either numbers or pchars (which get copied to strings internally). So whare's the problem with my approach? Only TWSocket.close seems to hang. I will test a bit more now, maybe I find a solution but I don't know what causes the hang. But normally the sequence TWSocket.close; TWSocket.Free; is okay to terminate and release it? Greetings Markus -- 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] Image transfer with TFtpClient
Hello, I'm using TFtpClient to put JPG image files on a FTP server. The problem is that with images smaller than 160/170 Kb, it works fine, but larger images are not sent correctly. The file itself seems not to be corrupted, but the image (a picture, in this case) is not sent completely. I already tried using the demo application which comes with ICS, and the problem happens there too (binary transfer is on). With other FTP applications the file is sent correctly (so the problem is not on server side, or even on the Internet link). Do you have idea? I can send you the image file, so you can see what I'm talking about. Thanks in advance, Fábio Defferrari --- Fábio Defferrari E-mail: [EMAIL PROTECTED] Defferrari Informática Ltda. Novo Hamburgo - RS - Brasil Telefone/Fax: 51 3594-2270 Home-page: www.defferrari.com.br --- -- 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] RasDial disconnect event
Sorry, no idea. Too long since I played with RAS API ! -- 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: "Wilfried Mestdagh" <[EMAIL PROTECTED]> To: Sent: Wednesday, February 01, 2006 11:06 AM Subject: [twsocket] RasDial disconnect event > Hello Francois, > > I need to make a datacall server with Ras dial up. So I take your > RadDial as example. Works fine, only thing is that RASCS_Disconnected is > never fired. It does not fire in your example eather. > > I'm testing it in winXP pro SP2. > > Maybe it does not matter becuase it seems RasHangupA is synchronious (it > tatke a short while for it to return so that's wy I think. > > But how do I get on an error string (if any) if the disconnect is not > fired ? > > -- > Rgds, Wilfried > 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 -- 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] RasDial disconnect event
Hello Francois, I need to make a datacall server with Ras dial up. So I take your RadDial as example. Works fine, only thing is that RASCS_Disconnected is never fired. It does not fire in your example eather. I'm testing it in winXP pro SP2. Maybe it does not matter becuase it seems RasHangupA is synchronious (it tatke a short while for it to return so that's wy I think. But how do I get on an error string (if any) if the disconnect is not fired ? -- Rgds, Wilfried 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
Re: [twsocket] listening on a multihomed computer
No worries, I decoded it in first attempt :) Primoz > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Fastream > Technologies > Sent: Wednesday, February 01, 2006 10:11 AM > To: ICS support mailing > Subject: Re: [twsocket] listening on a multihomed computer > > Sorry, it should be "either one OR all adapters". > > - Original Message - > From: "Primoz Gabrijelcic" <[EMAIL PROTECTED]> > To: "'ICS support mailing'" > Sent: Wednesday, February 01, 2006 10:31 AM > Subject: Re: [twsocket] listening on a multihomed computer > > > > Thanks. > > > > Primoz > > > >> -Original Message- > >> From: [EMAIL PROTECTED] > >> [mailto:[EMAIL PROTECTED] On Behalf Of Fastream > >> Technologies > >> Sent: Wednesday, February 01, 2006 9:27 AM > >> To: ICS support mailing > >> Subject: Re: [twsocket] listening on a multihomed computer > >> > >> Hi, > >> > >> You can listen on either one of all adapters (0.0.0.0). This > >> is Winsock design. > >> > >> Regards, > >> > >> SZ > >> > >> - Original Message - > >> From: "Primoz Gabrijelcic" <[EMAIL PROTECTED]> > >> To: > >> Sent: Wednesday, February 01, 2006 10:17 AM > >> Subject: [twsocket] listening on a multihomed computer > >> > >> > >> > Hello everybody, > >> > > >> > I have a following situation. Customer has a multihomed > >> computer (let's > >> > say > >> > with three public IP addresses) and wants my ICS-based > >> server to bind to > >> > only _two_ of those addresses. Is there a way to do that in > >> ICS? If not, > >> > is > >> > this a limitation of ICS or WinSock? > >> > > >> > The closest I have come to the answer by myself is to call > >> > WSocket_getsockname(Client.HSocket, name, namelen) in > >> OnClientConnect and > >> > drop the connection if it comes in on a wrong interface. A > >> better way > >> > would > >> > be not to listen on wrong interface at all, of course. > >> > > >> > (Yes, I know I can set up two servers and have each > listen on one > >> > interface > >> > only but that's not the way I would like to go - too many > >> changes in an > >> > already convoluted program.) > >> > > >> > Best regards, > >> > Primoz > >> > > >> > -- > >> > 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 > > > > -- > > 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 -- 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] listening on a multihomed computer
Sorry, it should be "either one OR all adapters". - Original Message - From: "Primoz Gabrijelcic" <[EMAIL PROTECTED]> To: "'ICS support mailing'" Sent: Wednesday, February 01, 2006 10:31 AM Subject: Re: [twsocket] listening on a multihomed computer > Thanks. > > Primoz > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of Fastream >> Technologies >> Sent: Wednesday, February 01, 2006 9:27 AM >> To: ICS support mailing >> Subject: Re: [twsocket] listening on a multihomed computer >> >> Hi, >> >> You can listen on either one of all adapters (0.0.0.0). This >> is Winsock design. >> >> Regards, >> >> SZ >> >> - Original Message - >> From: "Primoz Gabrijelcic" <[EMAIL PROTECTED]> >> To: >> Sent: Wednesday, February 01, 2006 10:17 AM >> Subject: [twsocket] listening on a multihomed computer >> >> >> > Hello everybody, >> > >> > I have a following situation. Customer has a multihomed >> computer (let's >> > say >> > with three public IP addresses) and wants my ICS-based >> server to bind to >> > only _two_ of those addresses. Is there a way to do that in >> ICS? If not, >> > is >> > this a limitation of ICS or WinSock? >> > >> > The closest I have come to the answer by myself is to call >> > WSocket_getsockname(Client.HSocket, name, namelen) in >> OnClientConnect and >> > drop the connection if it comes in on a wrong interface. A >> better way >> > would >> > be not to listen on wrong interface at all, of course. >> > >> > (Yes, I know I can set up two servers and have each listen on one >> > interface >> > only but that's not the way I would like to go - too many >> changes in an >> > already convoluted program.) >> > >> > Best regards, >> > Primoz >> > >> > -- >> > 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 > > -- > 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
Re: [twsocket] listening on a multihomed computer
Thanks. Primoz > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Fastream > Technologies > Sent: Wednesday, February 01, 2006 9:27 AM > To: ICS support mailing > Subject: Re: [twsocket] listening on a multihomed computer > > Hi, > > You can listen on either one of all adapters (0.0.0.0). This > is Winsock design. > > Regards, > > SZ > > - Original Message - > From: "Primoz Gabrijelcic" <[EMAIL PROTECTED]> > To: > Sent: Wednesday, February 01, 2006 10:17 AM > Subject: [twsocket] listening on a multihomed computer > > > > Hello everybody, > > > > I have a following situation. Customer has a multihomed > computer (let's > > say > > with three public IP addresses) and wants my ICS-based > server to bind to > > only _two_ of those addresses. Is there a way to do that in > ICS? If not, > > is > > this a limitation of ICS or WinSock? > > > > The closest I have come to the answer by myself is to call > > WSocket_getsockname(Client.HSocket, name, namelen) in > OnClientConnect and > > drop the connection if it comes in on a wrong interface. A > better way > > would > > be not to listen on wrong interface at all, of course. > > > > (Yes, I know I can set up two servers and have each listen on one > > interface > > only but that's not the way I would like to go - too many > changes in an > > already convoluted program.) > > > > Best regards, > > Primoz > > > > -- > > 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 -- 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] C++Builder 2006 and ICS
Albert Wiersch wrote: > I found a solution! Wow, that works even when you launch BDS with both personalities. Life can be so easy :) BTW: To get rid of the resampled BMP's in the tool palette you need a new set of dcr-files. Download: http://www.duodata.de/misc/IcsBdsDcr.zip They will be included in next ICS release. Also there seems to be a bug in BDS loading resources from third party packages delayed so that even with the new dcr files the default BMP is displayed resampled unless you either open a project with ICS components or drop a component on the form. In order to fix that navigate to HKCU\Software\Borland\BDS\4.0\Package Cache\IcsBcb100.bpl\ and set "Demand Load Package = 0" and start BDS. It will be reset to 1 but after that change the bitmaps are always shown in the correct size. Arno Albert Wiersch wrote: > I found a solution! > > 1. Uninstall the ICS package from BDS 2006. > 2. Exit BDS and run the Delphi Win32 personality. > 3. Load the ICS BDS 2006 package. > 4. Goto the Project Options->Linker and select "Generate all C++Builder > files". Click OK. > 5. Compile and install the package. > 6. If you exit and load the C++Builder personality now, the components > should now be in the Tool Palette. > > -- > Albert Wiersch > AI Internet Solutions > [EMAIL PROTECTED] > http://www.htmlvalidator.com/ > > > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of Albert Wiersch >> Sent: Tuesday, January 31, 2006 1:38 PM >> To: 'ICS support mailing' >> Subject: [twsocket] C++Builder 2006 and ICS >> >> >> >> I downloaded the latest ICS BETA and installed it in BDS >> 2006, but I cannot >> access the components in the C++Builder personality. They >> seem to be in the >> Delphi personality only. I need them in the C++Builder >> personality. Can >> anyone help with getting the latest BETA installed in BDS 2006 so the >> components are available in the C++Builder personality? >> >> By the way, it seems I also have this problem with some other >> components. I >> need them in the C++Builder personality but they're only >> available in the >> Delphi personality. >> >> Thank you. >> >> -- >> Albert Wiersch >> AI Internet Solutions >> [EMAIL PROTECTED] >> http://www.htmlvalidator.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 -- 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] listening on a multihomed computer
Hi, You can listen on either one of all adapters (0.0.0.0). This is Winsock design. Regards, SZ - Original Message - From: "Primoz Gabrijelcic" <[EMAIL PROTECTED]> To: Sent: Wednesday, February 01, 2006 10:17 AM Subject: [twsocket] listening on a multihomed computer > Hello everybody, > > I have a following situation. Customer has a multihomed computer (let's > say > with three public IP addresses) and wants my ICS-based server to bind to > only _two_ of those addresses. Is there a way to do that in ICS? If not, > is > this a limitation of ICS or WinSock? > > The closest I have come to the answer by myself is to call > WSocket_getsockname(Client.HSocket, name, namelen) in OnClientConnect and > drop the connection if it comes in on a wrong interface. A better way > would > be not to listen on wrong interface at all, of course. > > (Yes, I know I can set up two servers and have each listen on one > interface > only but that's not the way I would like to go - too many changes in an > already convoluted program.) > > Best regards, > Primoz > > -- > 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] listening on a multihomed computer
Hello everybody, I have a following situation. Customer has a multihomed computer (let's say with three public IP addresses) and wants my ICS-based server to bind to only _two_ of those addresses. Is there a way to do that in ICS? If not, is this a limitation of ICS or WinSock? The closest I have come to the answer by myself is to call WSocket_getsockname(Client.HSocket, name, namelen) in OnClientConnect and drop the connection if it comes in on a wrong interface. A better way would be not to listen on wrong interface at all, of course. (Yes, I know I can set up two servers and have each listen on one interface only but that's not the way I would like to go - too many changes in an already convoluted program.) Best regards, Primoz -- 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] C++Builder 2006 and ICS
Whow, that works even when you launch BDS with both personalities. Life can be so easy :) BTW: To get rid of the resampled BMP's in the tool palette you need a new set of dcr-files. Download: http://www.duodata.de/misc/IcsBdsDcr.zip They will be included in next ICS release. Also there seems to be a bug in BDS loading resources from third party packages delayed so that even with the new dcr files the default BMP is displayed resampled unless you either open a project with ICS components or drop a component on the form. In order to fix that navigate to HKEY_CURRENT_USER\Software\Borland\BDS\4.0\Package Cache\IcsBcb100.bpl\ and set "Demand Load Package = 0" and start BDS. It will be reset to 1 but after that change the bitmaps are always shown in the correct size. Arno Albert Wiersch wrote: > I found a solution! > > 1. Uninstall the ICS package from BDS 2006. > 2. Exit BDS and run the Delphi Win32 personality. > 3. Load the ICS BDS 2006 package. > 4. Goto the Project Options->Linker and select "Generate all C++Builder > files". Click OK. > 5. Compile and install the package. > 6. If you exit and load the C++Builder personality now, the components > should now be in the Tool Palette. > > -- > Albert Wiersch > AI Internet Solutions > [EMAIL PROTECTED] > http://www.htmlvalidator.com/ > > > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of Albert Wiersch >> Sent: Tuesday, January 31, 2006 1:38 PM >> To: 'ICS support mailing' >> Subject: [twsocket] C++Builder 2006 and ICS >> >> >> >> I downloaded the latest ICS BETA and installed it in BDS >> 2006, but I cannot >> access the components in the C++Builder personality. They >> seem to be in the >> Delphi personality only. I need them in the C++Builder >> personality. Can >> anyone help with getting the latest BETA installed in BDS 2006 so the >> components are available in the C++Builder personality? >> >> By the way, it seems I also have this problem with some other >> components. I >> need them in the C++Builder personality but they're only >> available in the >> Delphi personality. >> >> Thank you. >> >> -- >> Albert Wiersch >> AI Internet Solutions >> [EMAIL PROTECTED] >> http://www.htmlvalidator.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 -- 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] Problems with TWSocket.close and DLL
> The DLL has a data module which has one single TWSocket for all incomming data > and for each outgoing connection a TWSocket is created dynamically. The > instance of this > socket is stored in a TObjectList together with other relevant information. > When the first connection is opened a seperate thread within the DLL is > created for handling > of the windows messages (needed by TWSocket and other components as well). You must use TWSocket.ThreadAttach to bind a TWSocket to a thread different from the one which has created the socket. You must call ThreadDetach before terminating the thread of freeing the component. It may be easier to create and free the component within the thread's context, that is within thread's Execute method. When using a DLL, pay attention to memory allocation/deallocation (Use ShareMem). Also pay attention to the fact that whan not using runtime packages, a component of the same class in the main program and in the DLL is in fact two different components ! (Is and As operators do not work as expected at first glance, casting is very dangerous). -- 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 -- 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