Re: [twsocket] SMTPOpen failing, Why?
May I summarize. I have three options: 1. Continue to use "high level commands" (Open) and abort and tell the user, if the server does not support authentication. 2. Offer an option to use no authentication. 3. Chang to more basic functions and switch to no authentication in case of none available. Oh, by the way: I use V5 in this project. Thanks to all of you! Veit -- 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] SMTPOpen failing, Why?
Thanks Angus and DZ-Jay also! Angus Robertson - Magenta Systems Ltd wrote: >> I'm a little bit at a loss at the moment. I have the following log >> when trying to open a connection to an SMTP server: >> >> <-220 relay.infotn.it - Server ESMTP (Sun Java System Messaging >> Server 6.2-6.01 (built Apr 3 2006)) >> ->SMTP session connected, error #0 >> ->EHLO GPS_Plus >> <-250-relay.infotn.it >> <-250-8BITMIME >> <-250-PIPELINING >> <-250-DSN >> <-250-ENHANCEDSTATUSCODES >> <-250-HELP >> <-250-XLOOP 887A9C2E9DC36F355DA1AF23F4FAA02 >> <-250-ETRN >> <-250-N0-SOLICITING >> <-250 SIZE 0 >> ->AUTH CRAM-MD5 >> <-533 5.7.1 AUTH command is not enabled. >> --FAILED to login. Killing connection. >> (this is what I print as a message) >> >> --500 Authentication Type could not be determined. >> (this is the error message of TSmtpCli) > > You have the component set-up to authenticate to the SMTP server, when > it's impossible. If it was supported, there would be response similar to > the following: > > < 250-AUTH DIGEST-MD5 CRAM-MD5 PLAIN LOGIN > > You need to set AuthType := smtpAuthAutoSelect (or smtpAuthNone). Depending on if the user supplies a password or not I set it to one of these values. It was on smtpAuthAutoSelect, which seems to trigger the "->AUTH CRAM-MD5" request. So is this a bug of TSmtpCli? Should it send an AUTH request, if the command is not on the list? What is the default in this case? Veit -- 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] SMTPOpen failing, Why?
I'm a little bit at a loss at the moment. I have the following log when trying to open a connection to an SMTP server: <-220 relay.infotn.it - Server ESMTP (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) ->SMTP session connected, error #0 ->EHLO GPS_Plus <-250-relay.infotn.it <-250-8BITMIME <-250-PIPELINING <-250-DSN <-250-ENHANCEDSTATUSCODES <-250-HELP <-250-XLOOP 887A9C2E9DC36F355DA1AF23F4FAA02 <-250-ETRN <-250-N0-SOLICITING <-250 SIZE 0 ->AUTH CRAM-MD5 <-533 5.7.1 AUTH command is not enabled. --FAILED to login. Killing connection. (this is what I print as a message) --500 Authentication Type could not be determined. (this is the error message of TSmtpCli) ->SMTP session closed, error #0 What makes this SMTP Server different from others? I haven't got an error message like this before. Veit -- 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] SMTP Client and Streams
Wilfried Mestdagh wrote: > Hello Veit, > > You have to override TriggerGetData method. FEmailfiles is a TStringList > holding the filenames to attach. I think the most easy way is to use the > Objects of this stringlist to add TStreams instead of filenames. In > TriggerGetData Stream is opened from filename, so you can just use the > streams over there. Maybe a day work or so, maybe little longer with > test case.. Thanks Wilfried for the short instruction. Maybe I can do this in a few weeks. Is there a general interest to have this in ICS (besides Arno)? Veit -- 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] SMTP Client and Streams
Wilfried Mestdagh wrote: > Hello Arno, > Is there a possibility to use a stream as an attachment of an email? Besides of programming it all by myself, of course. >>> I don't think so, I recall that Wilfried asked the same questing last >>> year, possibly he has implemented that feature yet and can help with >>> some tips? > > You have a good memory :) No I did not implemented it because it was a > small project where the time to invest it was out of budget. Because it > was not a heavy load application I did a quick workaround by saving the > stream to a temp file before sending the mail. Thanks Arno and Wilfried I thought about Wilfrieds solution, too, and I probably will go that way. What are the chances and what would the time frame be of implementing stream input to ICS? I definitely need this in future projects. I might try it myself, but at the moment... Also I'm not sure that I have enough experience in this field. Veit -- 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] SMTP Client and Streams
Hi Is there a possibility to use a stream as an attachment of an email? Besides of programming it all by myself, of course. I couldn't find anything at first glance. Thanks Veit -- 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] OT: Re: NewICS-V6andICS-SSL-V6 availableBCBCOMPATIBILITYWARNING
Fastream Technologies wrote: > Hello Veit, > > And no, I don't speak German as I am from Turkey. Sorry, I don't know why, but I was under the impression the your company is from Germany (patriotism? ;) ). I don't have an international (english) version of the link at hand, but I'm sure a search for "Netiquette" will reveal several hits. But this is becoming really off topic. We better stop here. Best regards Veit -- 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] New ICS-V6andICS-SSL-V6 availableBCBCOMPATIBILITYWARNING
Hello Faststream Technologies Excuse me, but this is becoming a little bit annoying. Could you please shorten the quotation of your messages? I mean, is it really necessary to quote 300 lines for only line of text: Fastream Technologies wrote: > I am now 100% sure it is a ICSv6 vs. BCB issue. > > - Original Message - Approximately 300 Lines removed. Furthermore, why are there three threads wit the same subject? All of them started by you. Now I really don't want to offend you, but could you please think of the other persons using this list. Since you seem to be from Germany I would like to warmly recommend you to read the following: http://einklich.net/usenet/zitier.htm At last, I want to thank you for some interesting question, bringing insight into ICS, which I otherwise probably wouldn't have got. Veit -- 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] What's possible with ICS async architecture, today.
Fastream Technologies wrote: > Oops so sorry. The PNG was indisplayable by browsers anyway. Here it is: > That's becaus it was a TIF and not a PNG. Veit -- 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] SMTP connection limit
[EMAIL PROTECTED] wrote: > Hello: >> --- Original Message --- >>From: Veit > Zimmermann[mailto:[EMAIL PROTECTED] >> Sent: 3/8/2007 6:42:03 AM >> To : twsocket@elists.org >> Cc : >> Subject : RE: [twsocket] SMTP connection limit >> >> Hi >> >> Are there providers which limit the number of >> concurrent SMTP >> connections? In other words: Do I have to make the >> maximum number >> of connections for asynchronous operation flexible >> and what would >> be a good practice approach (besides making it user >> configurable). >> >> TIA >> > >Most ISP's SMTP servers limit the amount of > concurrent connections from the same source to about > 10 or 20. This is intended to prevent automatic > spamming and mail bombing runs, or to at least hinder > or limit their impact. This is pretty much an > industry standard nowadays (along with rejecting > connections from dynamic IP addresses). > >Making the limit configurable is a good idea, and > I would suggest a default limit of no more than 20. > Like Arno said in his post, asynchroneous connections > to the same server do not necessarily increase > performance significantly so it shouldn't matter that > much to the user. Thanks, I will consider changing to one connection in a later version. For now I have to live with user configuration. Thanks also to Arno and Francois. BTW: I used one of the SMTP examples as a guideline, which also uses one connection per mail sending multiple mails at the same time (if I didn't misunderstand the intention of the example). Maybe it should be mentioned in the example that this is not the preferred method. Regards -- * * Dipl.-Ing. Veit Zimmermann [EMAIL PROTECTED] * * VECTRONIC Aerospace GmbH www.vectronic-aerospace.com * * Carl-Scheele-Str. 12 tel: +49 (0)30 6789 4990 * * D-12489 Berlin fax: +49 (0)30 6789 5230 * * Germany WGS84: 52°25.83'N 13°31.52'E * * -- 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] SMTP connection limit
Hi Are there providers which limit the number of concurrent SMTP connections? In other words: Do I have to make the maximum number of connections for asynchronous operation flexible and what would be a good practice approach (besides making it user configurable). TIA Veit -- 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] bug in smtpprot.pas
Hi Arnaldo If you look at the source of FormatDateTime M is replaced by N if the preceding formatting character is H. I'm not quite sure if this works correctly, it won't hurt to change it to "nn" anyway. All: I checked FormatDateTime routines and they are all the same (regarding speed). So a call like Result := DateToStr (t, RFC822_FormatSettings) + ' ' + Time(t,RFC822_FormatSettings) + ' ' + TimeZoneBias with the following constant RFC822_FormatSettings : TFormatSettings = ( CurrencyFormat:3; NegCurrFormat: 8; ThousandSeparator: ','; DecimalSeparator: '.'; CurrencyDecimals: 2; DateSeparator: '.'; TimeSeparator: ':'; ListSeparator: ';'; CurrencyString:'€'; ShortDateFormat: 'dd.MM.'; LongDateFormat:'ddd, d mmm hh:nn:ss'; TimeAMString: ''; TimePMString: ''; ShortTimeFormat: 'hh:nn:ss'; LongTimeFormat:'hh:nn:ss'; ShortMonthNames: ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); LongMonthNames:('January', 'February', 'March', 'April', 'May', 'June', 'July', 'Augut', 'September', 'October', 'November', 'December'); ShortDayNames: ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); LongDayNames: ('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); TwoDigitYearCenturyWindow: 0;); would be easier to read. Moreover according to Delphi Help it would be thread save in opposition to a call without a TFormatSettings parameter. Veit Arnaldo Braun wrote: > Hi > > A small typo in > > hh:mm:ss > > must be corrected to > > hh:nn:ss or hh":"nn":"ss > > MM is month and NN is minute > > > > > Veit Zimmermann wrote: > >> Marcello Vezzelli wrote: >> >> >>> Hi all, >>> there is a bug in SmtpProt.pas (latest ics version just downloaded), >>> function Rfc822DateTime, line 2892 and 2907, FormatDateTime function. >>> >>>Result := FormatDateTime('ddd, d mmm hh:mm:ss', t) + >>> ' ' + TimeZoneBias >>> >>> The time separator : should be put between double quotes, like this: >>> >>>Result := FormatDateTime('ddd, d mmm hh":"mm":"ss', t) + >>> ' ' + TimeZoneBias >>> >>> Otherwise the system default time separator would be used (in italian >>> localization, default time separator is '.'). >>> >>> Regards >>> >>> >> I know this comes a little bit late, but... >> >> In the same function it is tested for English/US format by only >> comparing the first day (Sunday). Does anyone know if there is >> any other language where the Sunday is also abbreviated as "sun" >> but other days or months differ? >> >> if ShortDayNames[1] = MyShortDayNames[1] then >> Result := FormatDateTime('ddd, d mmm hh":"mm":"ss', t) + >> ' ' + TimeZoneBias >> >> Francois, why do you test at all and don't use TFormatSettings >> for all those functions? Is it performance? I don't know if the >> overloaded FormatDateTime function with TFormatStettings is slower. >> At least it makes the code much more readable and shorter (despite >> the definition of the TFormatSettings as a constant). >> >> Veit >> >> > -- * * Dipl.-Ing. Veit Zimmermann [EMAIL PROTECTED] * * VECTRONIC Aerospace GmbH www.vectronic-aerospace.com * * Carl-Scheele-Str. 12 tel: +49 (0)30 6789 4990 * * D-12489 Berlin fax: +49 (0)30 6789 5230 * * Germany WGS84: 52°25.83'N 13°31.52'E * * -- 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] Memory Leak in SmtpProt
Arno, That might be true. By the way: Wouldn't the following be sufficient? It should be much faster: if FMailMessage.Count > 0 then When will the next beta come out? Is there a time line? I know Francois is busy. Is he controlling releases alone or are others (like you) helping him on this? Because there is this other issue of which I'm not sure how important it is (see article: bug in smtpprot.pas by Marcello Vezzelli and its follow-ups) with at least two issues concerning RFC822DateTime. Veit Arno Garrels wrote: > Veit, > > You are not using latest Beta downloads. > > --- > Arno Garrels [TeamICS] > http://www.overbyte.be/eng/overbyte/teamics.html > > > Veit Zimmermann wrote: >> Hi >> >> It seems that there is a memory leak in SmtpProt: >> When sending an email and using MailMessage for including the >> text of the mail, the text is compared with an empty string with >> the GetText method of TStrings. This method creates a copy of >> the MailMessage TStrings which is not freed again: >> >> {if Length(FMailMessage.Text) > 0 then} { FP 05/03/06 } >> if FMailMessage.GetText^ <> #0 then >> FMailMsgTextPos := 1 >> else >> FMailMsgTextPos := 0; >> >> As you can Francois has already included a Fix. Why is this fix >> only a comment? >> >> Veit -- * * Dipl.-Ing. Veit Zimmermann [EMAIL PROTECTED] * * VECTRONIC Aerospace GmbH www.vectronic-aerospace.com * * Carl-Scheele-Str. 12 tel: +49 (0)30 6789 4990 * * D-12489 Berlin fax: +49 (0)30 6789 5230 * * Germany WGS84: 52°25.83'N 13°31.52'E * * -- 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] Memory Leak in SmtpProt
Hi It seems that there is a memory leak in SmtpProt: When sending an email and using MailMessage for including the text of the mail, the text is compared with an empty string with the GetText method of TStrings. This method creates a copy of the MailMessage TStrings which is not freed again: {if Length(FMailMessage.Text) > 0 then} { FP 05/03/06 } if FMailMessage.GetText^ <> #0 then FMailMsgTextPos := 1 else FMailMsgTextPos := 0; As you can Francois has already included a Fix. Why is this fix only a comment? Veit -- 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] TSmtpClient Exception handling
Hello The problem seems to be solved (more or less). It only occurs if the application is started from a network drive and the connection to that drive is cut. I'm not sure where the problem is exactly but all other accesses to the network do not result in this kind of desaster. Anyway: Not a problem of ICS anymore. Thanks (especially Arno) Veit Veit Zimmermann wrote: > Arno Garrels wrote: >> Veit Zimmermann wrote: >>> Arno Garrels wrote: >>>> Veit Zimmermann wrote: >>>>> Hi >>>>> >>>>> I'm currently testing my usage of TSmtpClient and I get some >>>>> strange behavior: When I unplug my computers network cable while >>>>> a SMTP connection is active it takes about 5 to 10 seconds and >>>>> then a MessageBox-like window appears with the Error Icon but no >>>>> test at all on it. >>>>> Ignoring the fact that my program is now >>>>> frozen, where does this window come from and how can I handle a >>>>> hard disconnect like this gracefully? >>>> Do you run the application in debugger? That would show you >>>> the line where the exception (if any) was raised. >>>> Usually, if the network cable is plugged off OnSessionClose will >>>> be triggered when the component tries to send or receive something. >>>> >>> I tried both. The problem is I get a lot of nice exception, which I >>> can identify very clearly and then I get some which bring up this >>> empty messagebox (caption by the way is programname.exe). The debugger >>> stops but does not show a position in the source code. >>> >>> Eventlog shows the following at this time >>> First chance exception at $7C812A5B. Exception class >>> EExternalException with message 'External exception C006'. >>> Process GPS_Plus.exe (3140) >> No idea, have you tried MadExcept? >> Seems to be neither an ICS nor a (real) Delphi/BCB exception. >> > Yes, it's included all the time. But it is not catching this one (if > it really is an exception). I'm beginning to track this down: It > occurs when I create an Object (TKZip, a Zip component). But I can't > trace into the create method although I have the source of the com- > ponent. > >> If the exception number is from ntstatus.h : >> >> // >> // MessageId: STATUS_IN_PAGE_ERROR >> // >> // MessageText: >> // >> // The instruction at "0x%08lx" referenced memory at "0x%08lx". >> // The required data was not placed into memory because of an I/O error >> // status of "0x%08lx". >> // >> #define STATUS_IN_PAGE_ERROR ((NTSTATUS)0xC006L)// winnt > > Thanks for the ntstatus info. > > Veit -- * * Dipl.-Ing. Veit Zimmermann [EMAIL PROTECTED] * * VECTRONIC Aerospace GmbH www.vectronic-aerospace.com * * Carl-Scheele-Str. 12 tel: +49 (0)30 6789 4990 * * D-12489 Berlin fax: +49 (0)30 6789 5230 * * Germany WGS84: 52°25.83'N 13°31.52'E * * -- 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] bug in smtpprot.pas
Marcello Vezzelli wrote: > Hi all, > there is a bug in SmtpProt.pas (latest ics version just downloaded), > function Rfc822DateTime, line 2892 and 2907, FormatDateTime function. > > Result := FormatDateTime('ddd, d mmm hh:mm:ss', t) + > ' ' + TimeZoneBias > > The time separator : should be put between double quotes, like this: > > Result := FormatDateTime('ddd, d mmm hh":"mm":"ss', t) + > ' ' + TimeZoneBias > > Otherwise the system default time separator would be used (in italian > localization, default time separator is '.'). > > Regards I know this comes a little bit late, but... In the same function it is tested for English/US format by only comparing the first day (Sunday). Does anyone know if there is any other language where the Sunday is also abbreviated as "sun" but other days or months differ? if ShortDayNames[1] = MyShortDayNames[1] then Result := FormatDateTime('ddd, d mmm hh":"mm":"ss', t) + ' ' + TimeZoneBias Francois, why do you test at all and don't use TFormatSettings for all those functions? Is it performance? I don't know if the overloaded FormatDateTime function with TFormatStettings is slower. At least it makes the code much more readable and shorter (despite the definition of the TFormatSettings as a constant). Veit -- 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] TSmtpClient Exception handling
Arno Garrels wrote: > Veit Zimmermann wrote: >> Arno Garrels wrote: >>> Veit Zimmermann wrote: >>>> Hi >>>> >>>> I'm currently testing my usage of TSmtpClient and I get some >>>> strange behavior: When I unplug my computers network cable while >>>> a SMTP connection is active it takes about 5 to 10 seconds and >>>> then a MessageBox-like window appears with the Error Icon but no >>>> test at all on it. >>>> Ignoring the fact that my program is now >>>> frozen, where does this window come from and how can I handle a >>>> hard disconnect like this gracefully? >>> Do you run the application in debugger? That would show you >>> the line where the exception (if any) was raised. >>> Usually, if the network cable is plugged off OnSessionClose will >>> be triggered when the component tries to send or receive something. >>> >> I tried both. The problem is I get a lot of nice exception, which I >> can identify very clearly and then I get some which bring up this >> empty messagebox (caption by the way is programname.exe). The debugger >> stops but does not show a position in the source code. >> >> Eventlog shows the following at this time >> First chance exception at $7C812A5B. Exception class >> EExternalException with message 'External exception C006'. >> Process GPS_Plus.exe (3140) > > No idea, have you tried MadExcept? > Seems to be neither an ICS nor a (real) Delphi/BCB exception. > Yes, it's included all the time. But it is not catching this one (if it really is an exception). I'm beginning to track this down: It occurs when I create an Object (TKZip, a Zip component). But I can't trace into the create method although I have the source of the com- ponent. > If the exception number is from ntstatus.h : > > // > // MessageId: STATUS_IN_PAGE_ERROR > // > // MessageText: > // > // The instruction at "0x%08lx" referenced memory at "0x%08lx". > // The required data was not placed into memory because of an I/O error > // status of "0x%08lx". > // > #define STATUS_IN_PAGE_ERROR ((NTSTATUS)0xC006L)// winnt Thanks for the ntstatus info. Veit -- * * Dipl.-Ing. Veit Zimmermann [EMAIL PROTECTED] * * VECTRONIC Aerospace GmbH www.vectronic-aerospace.com * * Carl-Scheele-Str. 12 tel: +49 (0)30 6789 4990 * * D-12489 Berlin fax: +49 (0)30 6789 5230 * * Germany WGS84: 52°25.83'N 13°31.52'E * * -- 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] TSmtpClient Exception handling
Arno Garrels wrote: > Veit Zimmermann wrote: >> Hi >> >> I'm currently testing my usage of TSmtpClient and I get some >> strange behavior: When I unplug my computers network cable while >> a SMTP connection is active it takes about 5 to 10 seconds and >> then a MessageBox-like window appears with the Error Icon but no >> test at all on it. >> Ignoring the fact that my program is now >> frozen, where does this window come from and how can I handle a >> hard disconnect like this gracefully? > > Do you run the application in debugger? That would show you > the line where the exception (if any) was raised. > Usually, if the network cable is plugged off OnSessionClose will > be triggered when the component tries to send or receive something. > I tried both. The problem is I get a lot of nice exception, which I can identify very clearly and then I get some which bring up this empty messagebox (caption by the way is programname.exe). The debugger stops but does not show a position in the source code. Eventlog shows the following at this time First chance exception at $7C812A5B. Exception class EExternalException with message 'External exception C006'. Process GPS_Plus.exe (3140) Veit -- 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] TSmtpClient Exception handling
Hi I'm currently testing my usage of TSmtpClient and I get some strange behavior: When I unplug my computers network cable while a SMTP connection is active it takes about 5 to 10 seconds and then a MessageBox-like window appears with the Error Icon but no test at all on it. Ignoring the fact that my program is now frozen, where does this window come from and how can I handle a hard disconnect like this gracefully? TIA Veit -- 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] Exception handling in a Form
Hello Wilfried Thanks for your reply. The answer is a surprise for me: Of course I know try except/finally, but why does it work when I wrap it around TnCnx.Connect? I thought this is an asynchronous method? But it works. I would have expected that the try/except block is left right after calling connect and not only until the connection is established or an exception occurs. Could you please explain this? Veit Wilfried Mestdagh wrote: > Hello Veit, > > Normally the components handles their own exception by design (as it > should be). Be sure you have no exceptions in events. If there is a > chance that your code can raise an exception then you should have that > event into an try excpet block and handle it. > > --- > Rgds, Wilfried [TeamICS] > http://www.overbyte.be/eng/overbyte/teamics.html > http://www.mestdagh.biz > > Thursday, January 25, 2007, 17:04, Veit Zimmermann wrote: > >> Hi > >> May be I'm missing something, but... >> How can I catch an exception raised by an asynchronous function like >> TnCnx.Connect in a form. In a TApplication there is a Method for this >> (HandleException). Is there something similar for a TForm? > >> TIA >> Veit -- ***** * Dipl.-Ing. Veit Zimmermann [EMAIL PROTECTED] * * VECTRONIC Aerospace GmbH www.vectronic-aerospace.com * * Carl-Scheele-Str. 12 tel: +49 (0)30 6789 4990 * * D-12489 Berlin fax: +49 (0)30 6789 5230 * * Germany WGS84: 52°25.83'N 13°31.52'E * * -- 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] Exception handling in a Form
Hi May be I'm missing something, but... How can I catch an exception raised by an asynchronous function like TnCnx.Connect in a form. In a TApplication there is a Method for this (HandleException). Is there something similar for a TForm? TIA Veit -- 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] TnCnx: Receiving NUL at end of line
Francois Piette wrote: >> I'm now testing TnCnx for my purposes. It works fairly well so far. >> The only issue I have so far is that I#m receiving NUL characters at the >> end of line. For example: >> >> ' Simplified orbitography parameters :'#$D#0#$D#$A' ND 021:23'... >> >> Is this an server issue or could it be related to ICS? > > This is a server issue. Historically NUL characters are used for dumb rs232 > terminals to avoid overflowing them (They where really slow for scrolling, > erasing, and so on). Thats the kind of answer I was hoping for! Thank you very much! >> If I use the Demo for TnCnx it stops receiving at the end of this line >> while the EmulVT Demo works properly. The problem in the TnCnx (like >> it was in my software) is that Len is is longer than this line and >> output ends at the NUL. Hyperterm works well here, but I can't see if >> it receives the NUL character. > > You problem here is a Delphi problem. If you handle received data as a nul > terminated string (PChar), then you don't see anything after the NUL > character. If you handle the string as a pure Delphi string, the NUL byte is > like any other characters. To be clear, when you have a PChar, nothing > prevent you from accessing data after the NUL character, but most functions > won't do that. > > You may consider writing a routine which remove the NUL characters before > processing. I already did so before, but I wanted to be sure to do the right thing here. Thanks Veit -- 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] TnScript: Getting Received data
Thanks Francois. I think I'll do it with TnCnx although there seems to be a small problem (see other thread). Veit Francois Piette wrote: > The problem is the packet nature of received data. If your trigger string is > in the middle of a data packet, then it is too late to catch data > immediately after the trigger string. But, depending on your application, > you can peek data in the virtual screen maintened by TTnScript. > > 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: "Veit Zimmermann" <[EMAIL PROTECTED]> > To: > Sent: Friday, January 19, 2007 1:13 PM > Subject: [twsocket] TnScript: Getting Received data > > >> Hi There >> >> I trying to use TnScript. So far it works very well. Now I'm >> trying to receive some data after detecting an event string. >> Is this possible? Or do I have to go back to TEmulVT and do >> it all from scratch? >> >> TIA >> Veit >> -- >> 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 > -- * * Dipl.-Ing. Veit Zimmermann [EMAIL PROTECTED] * * VECTRONIC Aerospace GmbH www.vectronic-aerospace.com * * Carl-Scheele-Str. 12 tel: +49 (0)30 6789 4990 * * D-12489 Berlin fax: +49 (0)30 6789 5230 * * Germany WGS84: 52°25.83'N 13°31.52'E * * -- 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] TnCnx: Receiving NUL at end of line
Hi I'm now testing TnCnx for my purposes. It works fairly well so far. The only issue I have so far is that I#m receiving NUL characters at the end of line. For example: ' Simplified orbitography parameters :'#$D#0#$D#$A' ND 021:23'... Is this an server issue or could it be related to ICS? If I use the Demo for TnCnx it stops receiving at the end of this line while the EmulVT Demo works properly. The problem in the TnCnx (like it was in my software) is that Len is is longer than this line and output ends at the NUL. Hyperterm works well here, but I can't see if it receives the NUL character. There is a test account at netdis.cls.fr. username: EVERYONE password: ARGOS Please use it only for this verification (if you have the time to). TIA Veit P.S. I hope I can get hold on a nice card from Berlin Adlershof soon. -- 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] TnScript: Getting Received data
Hi There I trying to use TnScript. So far it works very well. Now I'm trying to receive some data after detecting an event string. Is this possible? Or do I have to go back to TEmulVT and do it all from scratch? TIA Veit -- 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