Re: [twsocket] pop3 and lastresponse

2010-09-18 Thread Arno Garrels
ount - FBandwidthCount) + 1; // Ensure BufferSize > 0 Result := inherited Receive(Buffer, BufferSize); if FBandwidthEnabled and (Result > 0) then begin Inc(FBandwidthCount, Result); if (FBandwidthCount > FBandwidthMaxCount) and (not FBandwidthPause

Re: [twsocket] ICS - What Is My IP

2010-09-13 Thread Arno Garrels
s as well? Much better is to use your own webpage that returns the IP, it's rock science, in PHP it looks like: -- 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

[twsocket] Strange threads in ICS applications in Win7

2010-09-13 Thread Arno Garrels
Hi, FYI: http://stackoverflow.com/questions/2484921/strange-threads-in-application-in-win7-wow64 -- 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

Re: [twsocket] Is it possible to download a 1 byte rangewithTHttpServer..?

2010-09-11 Thread Arno Garrels
Fastream Technologies wrote: > Ok but file ranges start from "0" not "1" so that also must be > implemented: > > HttpCli1.ContentRangeBegin := '0'; > HttpCli1.ContentRangeEnd := '0'; It works, why don't you test that yourself? -- A

Re: [twsocket] Is it possible to download a 1 byte range withTHttpServer..?

2010-09-11 Thread Arno Garrels
Fastream Technologies wrote: > Is it possible to download a 1 byte range withTHttpServer..? Yes, try: HttpCli1.ContentRangeBegin := '1'; HttpCli1.ContentRangeEnd := '1'; against Webserv demo. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailin

Re: [twsocket] THttpServer - How to handle unimplemented request methods

2010-09-11 Thread Arno Garrels
RTT wrote: > Done. I've now sent you a PM with the .diff file. Thanks. -- 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] THttpServer - How to handle unimplemented request methods

2010-09-10 Thread Arno Garrels
RTT wrote: > On 10-09-2010 16:43, Arno Garrels wrote: >>> Another thing that would be useful, if added to the code base of the >>>> THttpConnection, is the possibility to send additional headers >>>> from the THttpConnection.SendDocument, to define

Re: [twsocket] THttpServer - How to handle unimplemented request methods

2010-09-10 Thread Arno Garrels
dr <> '' then > Header := Header + ContEncoderHdr; { V7.20 } > if aHeader > '' then > Header := Header + aHeader > Header := Header + GetKeepAliveHdrLines + #13#10; > ... Useful as well, probably the parameter should be named "Cust

Re: [twsocket] THttpServer POST

2010-09-10 Thread Arno Garrels
> Any thoughts that may fix me? >From a brief look, set a break point at line "Flags = hgAcceptData;" and see if it gets hit. -- 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] GBs of Memory leak which Memproof says is at the line Send(FDocBuf, len)

2010-09-10 Thread Arno Garrels
Arno Garrels wrote: > Fastream Technologies wrote: >> Let me elaborate: As our code is a proxy server and data keeps coming >> down in OnDocData of the Httpclient, I was pumping it to >> THttpConnection's descendent with Send(buf, len). However I noticed >> it was

Re: [twsocket] GBs of Memory leak which Memproof says is at the line Send(FDocBuf, len)

2010-09-10 Thread Arno Garrels
n the ComponentOptions should do the trick. If this flag is set it breaks the loop in method TCustomWSocket.ASyncReceive. -- 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] 535 SSL handshake failed. Error #1

2010-09-09 Thread Arno Garrels
V23_XX options. The sslV23_XX options include all version methods including TLS v1. In order to disable a version, use SslOptions sslOpt_NO_XXX instead. > > Thank you for cooperation, You are welcome. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list

Re: [twsocket] THttpServer POST

2010-09-09 Thread Arno Garrels
ever you get the idea for sure. On event OnPostDocument do some checks and prepare or allocate your receive buffer. OnPostedData is the event to Receive() data chunks and check for correct data length etc.. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing li

Re: [twsocket] 535 SSL handshake failed. Error #1

2010-09-09 Thread Arno Garrels
Svemu - Reparto Sviluppo wrote: > can you send me your compiled demo and dll? Just sent my working binary by private mail. Please let us know how it works. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mail

Re: [twsocket] SSL OnSslVerifyPeer vs. OnSslHandshakeDone event

2010-09-09 Thread Arno Garrels
of how many certificates the server sends. -- 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] 535 SSL handshake failed. Error #1

2010-09-09 Thread Arno Garrels
Svemu - Reparto Sviluppo wrote: > From: "Arno Garrels" >> It might be that the application loaded some incompatible >> OpenSSL libraries unless the full path and filenames are >> specified. >> >> try >>GSSLEAY_DLL_Name := ; >>GLIBEAY

Re: [twsocket] New DLL hijacking vulnerability KB 2269637

2010-09-09 Thread Arno Garrels
Tobias Rapp wrote: > Arno Garrels wrote: >> The DLL names are globally writable typed constants, set their values >> before the OpenSSL libraries are loaded. > > Is there any advantage to use writable typed constants like > > const GSSLEAY_DLL_Name : String = 

Re: [twsocket] 535 SSL handshake failed. Error #1

2010-09-08 Thread Arno Garrels
idea for investigate? As I understand, your customer uses your application rather than OverbyteIcsSslFtpTst.exe. If so, I would compare all SSL settings of your application with the demo settings. Or you could ask for a reason of error "error:14077447:SSL routines:SSL23_GET_SERVER_HELLO:reason(1095)&

Re: [twsocket] PASV fallback to public IP

2010-09-08 Thread Arno Garrels
dles this fine as well, no additional software required. -- 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] SSL OnSslVerifyPeer vs. OnSslHandshakeDone event

2010-09-08 Thread Arno Garrels
} > > > Is it safe to handle just one of these events, and if not what to > check for in each ? Yes, it's safe to only handle OnSslHandshakeDone. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.o

Re: [twsocket] 535 SSL handshake failed. Error #1

2010-09-08 Thread Arno Garrels
L 0.9.8a to 0.9.8b. Dunno the meaning of this error, may have to do with Kerberos. -- 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

[twsocket] Experimental built-in throttle and timeout changed again

2010-09-08 Thread Arno Garrels
d which was created/freed, enabled/unabled or its interval or event handler were changed frequently. Best performance is achieved by setting this property to TRUE. Files: U trunk/Delphi/Vc32/OverbyteIcsThreadTimer.pas -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mail

Re: [twsocket] PASV fallback to public IP

2010-09-07 Thread Arno Garrels
Arno Garrels wrote: > Angus Robertson - Magenta Systems Ltd wrote: > >> Doing the >> same on an FTP server is much harder, and really needs a public STUN >> server (as used for SIP for the same reason). > > Or simply: > > echo $_SERVER[REMOTE_ADDR]; BTW:

Re: [twsocket] PASV fallback to public IP

2010-09-07 Thread Arno Garrels
Angus Robertson - Magenta Systems Ltd wrote: > Doing the > same on an FTP server is much harder, and really needs a public STUN > server (as used for SIP for the same reason). Or simply: -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please

Re: [twsocket] New DLL hijacking vulnerability KB 2269637

2010-09-06 Thread Arno Garrels
// Something went wrong with loading OSSL, handle it. end; -- Arno Garrels -- 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

[twsocket] Bugfix in the experimental timeout source and conditionals renamed

2010-09-05 Thread Arno Garrels
Hi, I just checked in revision #586. Log: Fixed a bug in the experimental throttle and timeout source which made it impossible to use both features at the same time (EListError). Renamed conditionals EXPERIMENTAL_THROTTLE and EXPERIMENTAL_TIMEOUT to BUILTIN_THROTTLE and BUILTIN_TIMEOUT. It's now

Re: [twsocket] TSmtpCli and bad spam score

2010-09-04 Thread Arno Garrels
DZ-Jay wrote: > On Sep 04, 2010, at 11:40, Arno Garrels wrote: > >> Hello DZ-Jay, >> >> At least Firebird provides 5 priorities so why should we remove this >> feature from ICS? > > It's not standard, most clients assume there's only "lo

Re: [twsocket] TSmtpCli and bad spam score

2010-09-04 Thread Arno Garrels
Arno Garrels wrote: > Isn't it just the high priority itself, that scores? Or most likely the existence of the word "Priority", may it be low or high? But I cannot remember when I saw the last spam mail with a high priority. -- Arno Garrels -- To unsubscribe or change

Re: [twsocket] TSmtpCli and bad spam score

2010-09-04 Thread Arno Garrels
Hello DZ-Jay, At least Firebird provides 5 priorities so why should we remove this feature from ICS? It's likely that X-MSMail-Priority can be removed, however my OE v6 still uses it, XP SP3. Isn't it just the high priority itself, that scores? -- Arno Garrels > On 09/03/201

Re: [twsocket] New DLL hijacking vulnerability KB 2269637

2010-09-04 Thread Arno Garrels
Francois PIETTE wrote: >> const GSSLEAY_DLL_Name : String = 'SSLEAY32.DLL'; > > I think the solution is much simpler than what you think: Change > "const" by "var" so that the DLL name is provided thru a global This is not required since writable

Re: [twsocket] TSmtpCli and bad spam score

2010-09-03 Thread Arno Garrels
>> FHdrLines.Add('X-Priority: 3'); >> end >> } >> else begin >> FHdrLines.Add('Importance: low'); >> FHdrLines.Add('X-Priority: 5'); >> end; >> ... > >

Re: [twsocket] THtmlSmtpCli Outlook Express and attachment problem

2010-09-03 Thread Arno Garrels
ailSndHtml demo. If there is an attachment OE displays the paper clip for me, if there are only embedded images there's no paper clip visible. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinf

Re: [twsocket] THtmlSmtpCli and inline image lost

2010-09-03 Thread Arno Garrels
lt Content-ID "IMAGE". Some webmailer did not like our default CID. Thanks to Fabrice Vendé for providing a fix. Note that current ICS V7 moved to trunk: svn://svn.overbyte.be/ics/trunk or http://svn.overbyte.be:8443/svn/ics/trunk -- Arno Garrels -- To unsubscribe or change your s

Re: [twsocket] TSslWSocket in a non-blocking multithreaded server

2010-09-02 Thread Arno Garrels
delay on receiving. That's not correct. As the name implies, the connection is gone when you get this error. > my solution was to put comments before or (LastError = > WSAECONNABORTED) How does that help, it won't bring back the connection Anyway it doesn't help in curr

Re: [twsocket] TSslWSocket in a non-blocking multithreaded server

2010-09-02 Thread Arno Garrels
ry in the event log AFAIK: "EventID 4226: TCP/IP has reached the security limit imposed on the number of concurrent TCP connect attempts" This limit applies to halve open connections rather than the number of connections. -- 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] New SVN URLs. Please switch your work copies!

2010-09-01 Thread Arno Garrels
Anton S. wrote: >> I suggest you read the change log with a SVN client, > > I've read it just now, and all it said was about XE support :) In the TortoiseSVN log view you have to tick checkbox "Include merged revisions" to see all changes. -- Arno Garrels -- To

Re: [twsocket] New SVN URLs. Please switch your work copies!

2010-09-01 Thread Arno Garrels
t clients that way. > > I thought you had added EXPERIMENTAL_THROTTLE to the ICS FTP client to > replace the existing UseBandwidthControl implementation but it does > not seem to be in the latest v7, it must have been a test version. Yes, it is still a private copy but it works . --

Re: [twsocket] New SVN URLs. Please switch your work copies!

2010-09-01 Thread Arno Garrels
y have been requested by users many many times in this list. Please test them very hard and report how it works for you. -- 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] TSslWSocket in a non-blocking multithreaded server

2010-09-01 Thread Arno Garrels
the connection is closed on any handshake error AFAIR. -- Arno Garrels > > Best regards > Kurt > > > > -Oprindelig meddelelse- > Fra: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] > På vegne af Arno Garrels > Sendt: 1. september 2010

Re: [twsocket] TSslWSocket in a non-blocking multithreaded server

2010-09-01 Thread Arno Garrels
so moving your lengthy blocking code into worker threads was required anyway. Your current design might not be optimal, however it might be sufficient depending on your needs, it's easier to write anyway. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please

Re: [twsocket] TSslWSocket in a non-blocking multithreaded server

2010-09-01 Thread Arno Garrels
nning in the same thread context. > I just have to be sure that I understood your reference to > f_ERR_remove_state(unsigned ThreadID). > Should I call this function just before the Thread's execute method > returns, sending the threads ThreadID as param ? Yes, it is a cl

Re: [twsocket] New SVN URLs. Please switch your work copies!

2010-09-01 Thread Arno Garrels
OverbyteIcsPop3Prot.pas. I suggest you read the change log with a SVN client, unfortunately the change log published on the wiki page doesn't list merged revisions. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bi

[twsocket] New SVN URLs. Please switch your work copies!

2010-08-31 Thread Arno Garrels
ch doesn't get any more updates, updates go to the trunk from now. Access to the old icsv7 branch will be denied soon to 'force' people to switch their work copy to trunk. See also: http://wiki.overbyte.be/wiki/index.php/ICS_Download -- Arno Garrels -- To unsubscribe or

Re: [twsocket] TSslWSocket in a non-blocking multithreaded server

2010-08-30 Thread Arno Garrels
> though only with a server certificate ? It should work, of course you have to set all SSL related properties before TSslWSocket.Dup(). You can use a single instance of TSslContext for all client objects, that is thread-safe AFAIK. -- Arno Garrels -- To unsubscribe or change your setti

Re: [twsocket] ICS and SSL on x64 server

2010-08-27 Thread Arno Garrels
ful hint. Anyway, 32-bit processes cannot load and link 64-bit libraries. -- 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] ICS and SSL on x64 server

2010-08-27 Thread Arno Garrels
Graham Stratford wrote: > I downloaded a 64-bit version of the SSL libraries and moved the DLLs > into my System32 folder. Is that the problem? Sure, since Delphi/C++Builder is 32-bit you have to use 32-bit DLLs. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket m

Re: [twsocket] SSL: error reading key file

2010-08-26 Thread Arno Garrels
t; > At least, that got the app working for me. > > Thanks, Arno, for your wonderful assistance. You are wellcome. -- 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] SSL OnHandshakeDone ceritificate contains emptymembers

2010-08-26 Thread Arno Garrels
commonName field(s) of the subjectName field. Since X.509v3 the subjectAltName extension allows to hold the FQDN as well as other identifying information such as the IP address. We use function PostConnectionCheck to perform these checks for us. } -- Arno Garrels -- T

Re: [twsocket] TIcsLogger.DoDebugLog optimization

2010-08-25 Thread Arno Garrels
enate it _only_ if loAddStamp is set and it's the same > as execute procedure with AddTimeStamp + Msg. You do it always if loAddStamp is set regardless whether one of the destination options is set and in case of loDestEvent the OnIcsLogEvent is assigned or not. -- Arno Garrels -- T

Re: [twsocket] SSL OnHandshakeDone ceritificate contains emptymembers

2010-08-25 Thread Arno Garrels
g or to skip any error. Display('Checking certificate'#13#10 + 'Subject: "' + Cert.SubjectOneLine + '"'#13#10 + 'Issuer: "' + Cert.IssuerOneLine + '"'#13#10 + 'Verify result: &

Re: [twsocket] TIcsLogger.DoDebugLog optimization

2010-08-25 Thread Arno Garrels
I suggest change > the code as following: This is non-optimal as well. You always concatenate and allocate the string even though it's not used. That sure leads to smaller source code but only performs faster _if you actually write to multiple log destinations. -- Arno Garrel

Re: [twsocket] SSL: error reading key file

2010-08-24 Thread Arno Garrels
08:38:10:367 00817E70 ResetSslSession 216 > > Which looks to me like a successful connection. What should I be > looking for? And where? Compare your settings with the settings in OverbyteIcsWebserv demo, the difference was most likely the answer to your question, provided both browse

Re: [twsocket] SSL OnHandshakeDone ceritificate contains empty members

2010-08-24 Thread Arno Garrels
ou misunderstood the SslVerifyPeer property. -- 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] SSL: error reading key file

2010-08-23 Thread Arno Garrels
#x27;m > tearing my hair out over this, and falling behind on a deadline. I guess property TSslContext.SslPassPhrase is not assigned / empty. -- 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] Suggestion for improvement

2010-08-19 Thread Arno Garrels
ed the maximum number of message IDs per WndHandler. If you do not use SVN you can get the file with a a browser as well URL: http://svn.overbyte.be:8443/svn/ics/branches/icsv7/Delphi/Vc32/OverbyteIcsWndControl.pas Both user and password "ics" -- Arno Garrels -- To unsubscribe or chan

Re: [twsocket] Suggestion for improvement

2010-08-18 Thread Arno Garrels
range 50-1000, anything beyond makes no sense IMO. Setting the maximum number of messages per handler would be just one line: GWndHandlerPool.SetMaxMsgPerHandler(200); The GWndHandlerPool variable is assigned in OverbyteIcsWndControl's initialization section. -- Arno Garrels -- To un

Re: [twsocket] ICS Wnd Control - Possible bug

2010-08-18 Thread Arno Garrels
Arno Garrels wrote: > Eric, > > I guess it helps to remove all pending messages with the given ID > from the queue when the message ID is unregistered. > > One could do that either in custom code or maybe it should > be added in TIcsWndHandler.UnregisterMessage as belo

Re: [twsocket] ICS Wnd Control - Possible bug

2010-08-18 Thread Arno Garrels
if not Assigned(FMsgMap[Msg - FMsgLow]) then raise EIcsException.Create('Msg not registered'); FMsgMap[Msg - FMsgLow] := nil; Dec(FMsgCnt); Msg := 0; while PeekMessage(LMsg, FHandle, Msg, Msg, PM_REMOVE) do {loop}; // <== added if FMsgCnt = 0 then De

Re: [twsocket] ICS Message handlers

2010-08-13 Thread Arno Garrels
hout using > system resources as handles, only memory One limitation with such kind of implementation (might not be relevant) is that the application blocks until entire list of events is processed. Like iterating over a list of n server clients blocks all clients. -- Arno Garre

Re: [twsocket] OT: ICS-based IQ Proxy Server supports 60Kconcurrent connections on single port now!

2010-08-13 Thread Arno Garrels
bet that. I only wonder how long this option will be available since interactive services have been deprecated since Vista. -- 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] ICS Message handlers

2010-08-13 Thread Arno Garrels
. There are demos of both in the MiscDemos directory. -- 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] ICS Message handlers

2010-08-13 Thread Arno Garrels
llow more. Just tested on Win7 64-bit 8 GB RAM: interactive = 9982 vs. 2277 non-interactive service. Good to know! -- 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 websit

Re: [twsocket] ICS Message handlers

2010-08-13 Thread Arno Garrels
ow do I send? No, the list server will eat it, either upload it to some website and post the link here or send me a private e-mail, thanks. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsock

Re: [twsocket] ICS Message handlers

2010-08-12 Thread Arno Garrels
cation that demonstrates this? -- 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] OT: Delphi/C++ Builder XE Preview Video

2010-08-11 Thread Arno Garrels
cal or: https://forums.embarcadero.com/forum.jspa?forumID=67 The EMBT forums are monitored by EMBT employees. It makes absolutely no sense to discuss the RAD Studio roadmap in TWSocket list. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.e

Re: [twsocket] DNS Problem

2010-08-09 Thread Arno Garrels
c32/OverbyteIcsWSocket.pas User and password both "ics". -- 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] DNS Problem

2010-08-09 Thread Arno Garrels
ad context, I > can response many addresses all at once, correct? In parallel yes, the more CPUs or cores the better. > Is it safe to use WSocketResolveHost routine? I can translate the > result to dotted IP address easily Yes, it is safe, however I would consider to use WSocket_gethostbyn

Re: [twsocket] DNS Problem

2010-08-09 Thread Arno Garrels
the host by > using WSocket_Synchronized_ResolveHost Sorry I misunderstood. I thought you used method DnsLookup. So in this case it is simple to fix, call method DnsLookup and connect with a dotted IP address from the OnDnsLookupDone event handler. -- Arno Garrels -- To unsubscribe or change your setti

Re: [twsocket] DNS Problem

2010-08-09 Thread Arno Garrels
Eric Fleming Bonilha wrote: >> Arno Garrels wrote: >> >>> So multiple calls to DnsLookup from the same thread context are >>> serialized. >> >> In other words, DnsLookup always returns immediately, however >> Win32 API WSAAsyncGetHostByName seri

Re: [twsocket] Detecting POP3 protocol state and disconnecting

2010-08-09 Thread Arno Garrels
It is obviously not for timeout > like for example waiting for server response because you have to use > TTimer for that. I also tried to see if it will be used for DNS lookup > or something like that but it doesn't seem to have any effect... This timeout only works (if at all) wit

Re: [twsocket] Found a bug and made a fix in function UrlDecode

2010-08-09 Thread Arno Garrels
Bjørnar Nielsen wrote: > Arno, > >> ... try the following code and let me know how it works for you, > > The code works for me. But should not the first overload directive > be inside the conditional define? Yes, it's better inside, corrected. Just updated the

Re: [twsocket] DNS Problem

2010-08-07 Thread Arno Garrels
Arno Garrels wrote: > So multiple calls to DnsLookup from the same thread context are > serialized. In other words, DnsLookup always returns immediately, however Win32 API WSAAsyncGetHostByName serializes multiple requests from the same thread context internally. This may t

Re: [twsocket] DNS Problem

2010-08-07 Thread Arno Garrels
me which is an asynchronous function, however WSAAsyncGetHostByName does not resolve multiple requests concurrently. So multiple calls to DnsLookup from the same thread context are serialized. http://msdn.microsoft.com/en-us/library/ms741522%28VS.85%29.aspx -- Arno Garrels -- To unsubscribe

Re: [twsocket] Found a bug and made a fix in function UrlDecode

2010-08-06 Thread Arno Garrels
Bjørnar, > Arno, > >> The only workaround that comes to my mind was another overload that >> takes >> a RawByteString instead of string. I won't use AnsiString because >> implicit ansi string casts must be avoided too. > > That would work for me. I'm not very familiar with the use of > RawByte

Re: [twsocket] Found a bug and made a fix in function UrlDecode

2010-08-06 Thread Arno Garrels
t comes to my mind was another overload that takes a RawByteString instead of string. I won't use AnsiString because implicit ansi string casts must be avoided too. -- 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] Found a bug and made a fix in function UrlDecode

2010-08-05 Thread Arno Garrels
d, the data gets messed up > and I had a problem until I made this fix. Can't you use your own custom function then? -- 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] Found a bug and made a fix in function UrlDecode

2010-08-05 Thread Arno Garrels
; //Windows-1252 Try this: {code} var Str: string; begin Str := 'Åge'; Str := UrlEncode(Str, CP_UTF8); Caption := UrlDecode(Str, CP_UTF8, False); end; {code} -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://list

Re: [twsocket] TWSocketServer OnConnection event

2010-08-04 Thread Arno Garrels
site has a particular problem. If that actually happens it's definitely not an application issue. According to the Microsoft docs there is just one possible error: WSAENETDOWN "The network subsystem failed". http://msdn.microsoft.com/en-us/library/ms741540.aspx -- Arno Garrels --

Re: [twsocket] TWSocketServer OnConnection event

2010-07-29 Thread Arno Garrels
tware and/or > server. > Might be a FIN_WAIT DoS attack and the Mexico server hasn't got all security patches? http://www.recurity-labs.com/content/pub/Microsoft_Windows_CVE-2009-1926_MS09-048.txt http://www.microsoft.com/technet/security/bulletin/ms09-048.mspx -- Arno Garrels -- To uns

Re: [twsocket] THtmlSMTPCli

2010-07-20 Thread Arno Garrels
y to load such an email with different clients and see what happens? -- 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] How to determine MX servers priority in TDnsQuerycomponent ?

2010-07-20 Thread Arno Garrels
nIndex := DnsQuery.AnswerTag[I]; MxServ := DnsQuery.MXExchange[nIndex]; Pref := DnsQuery.MXPreference[nIndex]; .. The server with the smallest preference value has top priority. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists

Re: [twsocket] SSH support

2010-07-19 Thread Arno Garrels
* the project, compile is not enough. -- 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] SSH support

2010-07-17 Thread Arno Garrels
Fredrik Larsson wrote: > Can't you use something like Putty to tunnel the traffic? It's possible to write a wrapper around Putty. FileZilla source code shows how to do that, they use Putty for their SFTP support. -- Arno Garrels > > /Fredrik > > -Original Mess

Re: [twsocket] SSH support

2010-07-17 Thread Arno Garrels
r library > added to it? SSH might be supported by Indy? -- 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

[twsocket] Additional packages for installation in both IDE personalities?

2010-07-13 Thread Arno Garrels
I use them frequently, what do you think, shall I add them to the public source? Disadvantage was 8 new package project files in Delphi\Vc32 to be maintained whenever a new unit is added. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http

Re: [twsocket] A better Unicode port of the POP3 client

2010-07-13 Thread Arno Garrels
custompop3cli@GetUserName$qqrv"' *) (*$HPPEMIT '#pragma alias "@overbyteicspop3p...@tcustompop3cli@GetUserNameW$qqrv"="@overbyteicspop3p...@tcustompop3cli@GetUserName$qqrv"' *) -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list pleas

Re: [twsocket] A better Unicode port of the POP3 client

2010-07-10 Thread Arno Garrels
ned for you locally but not with the ics7 downloadable > package. > > when I replace with older variant: > > FLocalAddr := '0.0.0.0'; {bb} Thanks, corrected and uploaded. ICS_ANY_HOST_V4 is a const defined as '0.0.0.0' in the IPv6 branch. -- Arno

Re: [twsocket] Problems sending multiple E-Mails

2010-07-08 Thread Arno Garrels
ected as well and do whatsoever is needed if something went wrong. The demos often do not include full error handling in order to keep them small. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo

Re: [twsocket] TIpFtp: suspicious code and other

2010-07-08 Thread Arno Garrels
rty TFtpClient.LocalStream. See button "Transmit using a stream" in OverbyteIcsFtpTst demo. -- 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] Problems sending multiple E-Mails

2010-07-07 Thread Arno Garrels
essage); message WM_SEND_DELAYED; [..] implemtation procedure TForm1.WmSendMailDelayed(var Msg: TMessage); begin if Msg.WParam > -1 then sendMail else ShowMessage('Done'); end; Use it like: PostMessage(Form1.Handle, WM_SEND_DELAYED, whereIam, 0); -- Arno Garrels --

Re: [twsocket] Problems sending multiple E-Mails

2010-07-07 Thread Arno Garrels
connection is closed, or handle event OnSessionClosed as well. > else > ShowMessage('ok'); Do not call ShowMessage() from event handler, it processes messages which could lead to reentrance into the handler or to other unwanted results

Re: [twsocket] A better Unicode port of the POP3 client

2010-07-05 Thread Arno Garrels
S: UTF8String) will be converted to UTF8String implicitly if its codepage wasn't CP_UTF8. In order to prevent those implicit conversions of ansi strings you have to use RawByteString as the parameter type. Passing a UnicodeString to a parameter of type RawByteString converts it to the default Ans

[twsocket] A better Unicode port of the POP3 client

2010-07-04 Thread Arno Garrels
Just rename your existing OverbyteIcsPop3Prot.pas, unzip the new one to your Ics/Delphi/Vc32 directory and _rebuild_ the ICS packages. It also includes an updated version of OverbyteIcsMailRcv1.pas that goes into your Ics/Delphi/Internet directory. -- Arno Garrels -- To unsubscribe or change your settings

Re: [twsocket] pop3, buffer and character encoding

2010-07-03 Thread Arno Garrels
big problem - I have 2 ideas then to satisfy everybody > and improve codepages compatibility: > > Idea 1: Why not introduce TPop3Cli.LastResponseTb which would be > identical to LastResponse except different type (TBytes)? Yes, probably we should introduce a new property LastRa

Re: [twsocket] pop3, buffer and character encoding

2010-07-02 Thread Arno Garrels
typedef AnsiStringT<28591> Latin1String; and store data in > Latin1String type - this will ensure that the codepage conversions are > always in identical codepage and not dependent on the system code > page. I think the ICS components need a lot more changes (basic design changes)

Re: [twsocket] pop3, buffer and character encoding

2010-07-01 Thread Arno Garrels
8-bit characters in header lines properly. MIME text parts might include 8-bit characters with a charset specified in the content-type header, in those cases the (AnsiString) text content has to be converted to Unicode with the charset specified. -- Arno Garrels -- To unsubscribe or change

Re: [twsocket] A bug with Pop3 - followup

2010-07-01 Thread Arno Garrels
g (kewords = bold, clNavy). Everyting else looks o.k.. > > But styling is easy Thanks, just made the change, looks IMO better now. -- 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] A bug with Pop3 - followup

2010-07-01 Thread Arno Garrels
been > a while. I like the ICS code style, it's close to the offical Delphi and my own except for the uppercase "String" and the hanging "begin" (both should IMO be changed). -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please

Re: [twsocket] A bug with Pop3 - followup

2010-06-30 Thread Arno Garrels
Zvone wrote: > So if you changed some of the wiki pages now you can surround it with > these tags and make your code look nicer. Looks nice with C++, however the Delphi colors should be changed. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list pleas

Re: [twsocket] A bug with Pop3 - followup

2010-06-30 Thread Arno Garrels
very simple and not use c++-ish stuff like ?: and >> similar so it should be fairly easy to understand even if not >> translated to Delphi. > > Done. Changed your translation, it was full of bugs and neither followed the official Delphi nor the ICS code format. -- Arno Garrels

<    3   4   5   6   7   8   9   10   11   12   >