Re: [twsocket] Multiple OnDataAvailable calls when no data to read

2008-11-25 Thread Wilfried Mestdagh
Hello Anton, Don't worry. You don't have to do anything on the 'would block' winsock error. TWSocket deals with it. when OnDataAvailable fires, just try to receive all data. When Receive return 0 or -1 then just exit the event handler. -1 is error (don't worry), and 0 is if the peer has closed.

Re: [twsocket] UDP Address

2008-10-16 Thread Wilfried Mestdagh
Hello Martin, Here is a small example: procedure TFoo.FUDPDataAvailable(Sender: TObject; Error: word); var Buffer: array [0..1023] of char; Len: integer; Src: TSockAddrIn; SrcLen: integer; begin SrcLen := SizeOf(Src); Len := TWSocket(Sender).ReceiveFrom(@Buffer, SizeOf(Buffer),

Re: [twsocket] gphttpproxy component problem

2008-07-03 Thread Wilfried Mestdagh
Hello ibrahim, > Some pictures are not showing When the server close then the local connection is closed also. Probably all data is not transmitted to the client at this moment. Try to find this place in the code and replace Close or CloseDelayed with Shutdown(1). That's probably the reason. ---

Re: [twsocket] Socket throughput optimizations

2008-06-11 Thread Wilfried Mestdagh
Hello Tobias, > In order to messure transmission speed I would write a small > test suite including client and server. The client would send > preallocated, constant data blocks in a loop and would use event > OnDataSent to send the next block. The server would simply through > away anything. Yo

Re: [twsocket] ICS functions blocked when UI is active

2008-06-04 Thread Wilfried Mestdagh
Hello John, Normally this is no problem. I think with dropdown menu open there is no problem also, because windows is pumping messages when a menu is open. But depending on your applicaiton you can do the socket thing in a separate thread. Other possibility is to run the communication in a NT ser

Re: [twsocket] TWSocket.Send timing

2008-05-15 Thread Wilfried Mestdagh
> My debug function to log the timestamps was the culprit. oke then all is fine :) --- 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://lists.elists.org/cgi-bi

Re: [twsocket] TWSocket.Send timing

2008-05-15 Thread Wilfried Mestdagh
for the data to > actually be sent. > Given the 300ms for Send to return, is this to be expected? > If it is, then I will look to optimise elsewhere. But it just seems likely > that > something is a miss - wrong option setting maybe. > Regards, > Andy > Wilfried Mestdagh wrote:

Re: [twsocket] TWSocket.Send timing

2008-05-14 Thread Wilfried Mestdagh
Hello Dan, > As far as I know it shouldn't cause the TWSocket send call to take > longer since that is asynchronous Correct, but I think he means the total time to send, not the time of the function call. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.me

Re: [twsocket] TWSocket.Send timing

2008-05-13 Thread Wilfried Mestdagh
Hello Andy, > I am logging the time before and after a call to Send. I am sending 60 bytes, > and the Send call is taking 300ms to complete. this is the nagle algoritm. nagle wait a little while to see if you want to send more. this is to fill up a complete packet of 1514 (?) bytes. You can speed

Re: [twsocket] OnDataSent event and related questions

2008-05-13 Thread Wilfried Mestdagh
Hello Andy, > I think that we are at cross purposes here. The OnDataSent event looks like it > does not fire (sometimes) if the far end (server) closes the connection. Is > this > true? OnDataSent is fired when TWSocket has delivered his data to winsock. As Arno pointed out it is not a signal th

Re: [twsocket] ICS Client Thread Safe

2008-05-12 Thread Wilfried Mestdagh
Hello Éric, Can you start a new message instead of a reply if you start a new subject please? Many people will not see your message now. > I would like to know if the Send routine of TCustomWSocket is thread safe. Yes in the later versions it is protected by a critical section. It can be switche

Re: [twsocket] mx lookup

2008-05-08 Thread Wilfried Mestdagh
Sorry forget this mail I did not read the answer from DZ good :( --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Thursday, May 8, 2008, 16:42, Wilfried Mestdagh wrote: > thanx Dz and Arno, > some more questions. What about the MXPref

Re: [twsocket] mx lookup

2008-05-08 Thread Wilfried Mestdagh
thanx Dz and Arno, some more questions. What about the MXPreference? For example if I do a mx lookup for sonal.be it returns mail.sonal.be with value 10 and mxl.sonal.be with value 50. Does this mean one of the 2 is preferred? and if so the one with the lowest value or the highest one? --- Rgds,

[twsocket] mx lookup

2008-05-08 Thread Wilfried Mestdagh
Hello, To find out which is the smtp server I have to send mail to for a particular domain I can use the MXPreference[n] property of DnsQuery component. But in what case there can be multiple results ? (I tryed a few and get only 1 result 'answer#1 in demo program'). What is the MXExchange[n] pro

Re: [twsocket] Sending binary data

2008-05-07 Thread Wilfried Mestdagh
Hello Daniel, It is indeed not a rare situation. Sending the length of the data first is a good idea, I do it often. another simple option is to escape some characters and still use lineMode. You have to escape the LineEnd characters as whell as the escape byte. See also http://wiki.overbyte.be fo

Re: [twsocket] detecting circular mail

2008-04-20 Thread Wilfried Mestdagh
d [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Sunday, April 20, 2008, 16:03, DZ-Jay wrote: > On Apr 20, 2008, at 04:31, Wilfried Mestdagh wrote: >> Can someone advice on how the best way to detect a circular mail? >> >> I have smtp serv

Re: [twsocket] detecting circular mail

2008-04-20 Thread Wilfried Mestdagh
Hello Francois, Yes looks simple and very reliable. However what if I'm running on the same machine as the other one? I'm examing some mail headers and it looks some servers list also the HELO string, but not all. If they did it all then I could make an exclusive HELO string. --- Rgds, Wilfried [

[twsocket] detecting circular mail

2008-04-20 Thread Wilfried Mestdagh
Hello, Can someone advice on how the best way to detect a circular mail? I have smtp server and the mailboxes are all GSM. Sms are sent to another smtp server who deliver it for email reader (pop3 or imap). When users send email the other smtp server delivers it to mine who send it then to the GS

Re: [twsocket] Sending mail with SMTPClient including images

2008-04-17 Thread Wilfried Mestdagh
> Any help appreciated > TIA > Jeff > -- > Jeff Cook > Aspect Systems Ltd > Phone: +682 28 213 > Skype: jeffraro > www.aspect.co.nz > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of Wilfried Mestdagh > Sent: Tuesda

Re: [twsocket] Sending mail with SMTPClient including images

2008-04-08 Thread Wilfried Mestdagh
ing with Delphi 6 if > that makes any difference. > Meitaki Ma'ata > Kia Manuia > Jeff > -- > Jeff Cook > "The Cooks" Oasis > The Cooks Ltd > Phone: +682 28 213 > Skype: jeffraro > www.cookislandsoasis.com > -----Original Message- >

Re: [twsocket] Sending mail with SMTPClient including images

2008-04-07 Thread Wilfried Mestdagh
Hello Jeff, > the image gets stripped on the way out. I DON'T want to have the image > sent as an attachment (can already do that) but want it in the body of > the email itself. The HTML part is an attachment and the images are also attachments. If you want the images in the html document you h

Re: [twsocket] UDP Newbie...

2008-04-07 Thread Wilfried Mestdagh
er > Now, back to my testing application and changing connect to listen generates > the same error. > Going back to connect, all if working again. > Something I do not understand is going on. > Ciao, > Mark > -Original Message- > From: [EMAIL PROTECTED] &g

Re: [twsocket] THttpCli.CtrlSocket.OnBgException

2008-04-07 Thread Wilfried Mestdagh
Hello crazdcodr, I don't see complaints but here is an example. procedure CtrlSocketBgException(Sender: TObject; E: Exception; var CanClose: boolean); HttpCli1.CtrlSocket.OnBgException := CtrlSocketBgException; procedure TForm1.CtrlSocketBgException(Sender: TObject; E: Exception; var CanClo

Re: [twsocket] UDP Newbie...

2008-04-06 Thread Wilfried Mestdagh
ing again. z>> Something I do not understand is going on. z>> Ciao, z>> Mark z>> -Original Message- z>> From: [EMAIL PROTECTED] z>> [mailto:[EMAIL PROTECTED] On Behalf Of Wilfried Mestdagh z>> Sent: Sunday, April 06, 2008 12:27 PM z>>

Re: [twsocket] UDP Newbie...

2008-04-06 Thread Wilfried Mestdagh
rsion of ICS are you using? > Cheers, > Mark > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Wilfried Mestdagh > Sent: Sunday, April 06, 2008 4:57 AM > To: ICS support mailing > Subject: Re: [twsocket] UDP Newbie...

Re: [twsocket] small but pertinent doubt

2008-04-06 Thread Wilfried Mestdagh
ontrol on the > mains form's table. > Am I thinking straight? > Thank you > João > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Wilfried Mestdagh > Sent: sábado, 5 de Abril de 2008 16:27 > To: ICS support mail

Re: [twsocket] UDP Newbie...

2008-04-06 Thread Wilfried Mestdagh
Hello Mark, I tryed to do the same as you listen with IP addres of same machine, and when I click the button, 'Hello' is received. This is the complete unit: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, WSocket; ty

Re: [twsocket] small but pertinent doubt

2008-04-05 Thread Wilfried Mestdagh
age- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Wilfried Mestdagh > Sent: sábado, 5 de Abril de 2008 8:26 > To: ICS support mailing > Subject: Re: [twsocket] small but pertinent doubt > Hello João, > Here http://www.overbyte.be/eng/products/ics.h

Re: [twsocket] small but pertinent doubt

2008-04-05 Thread Wilfried Mestdagh
s tone more thing: can youn point me to that example? I can't seem to find > it:-( > Thank you, > João > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Wilfried Mestdagh > Sent: sábado, 5 de Abril de 2008 0:38 >

Re: [twsocket] small but pertinent doubt

2008-04-04 Thread Wilfried Mestdagh
inal Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Wilfried Mestdagh > Sent: sexta-feira, 4 de Abril de 2008 8:29 > To: ICS support mailing > Subject: Re: [twsocket] small but pertinent doubt > Hello João, > Use TWSocketServer component

Re: [twsocket] small but pertinent doubt

2008-04-04 Thread Wilfried Mestdagh
Hello João, Use TWSocketServer component wich handles all clients by itself. There are some example files. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Thursday, April 3, 2008, 23:17, João Gonçalves wrote: > Hello, > I developed an applic

Re: [twsocket] Connecting and Disconnecting

2008-04-01 Thread Wilfried Mestdagh
Hello Éric, When it is disconnected then OnSessionClose is fired. There you post a message to a custom message handler where you connect again. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Tuesday, April 1, 2008, 22:15, Éric Fleming Bonilh

Re: [twsocket] THttpCli exception errors

2008-04-01 Thread Wilfried Mestdagh
Hello, > The error still persists, though, I don't see your original post. Can you tell me what the error is? > and remains to crash the app. What do you mean by 'crash'? Is there an exception error, is the application non responcive, something else? > Is there another way to go about this err

Re: [twsocket] UDP Newbie...

2008-04-01 Thread Wilfried Mestdagh
Hello Mark, > If I call listen and then try to send I get an error 10049 (Bind Address not > available) Are you sure you filled in the correct IP? > If I call connect and then send, I see the data at the other end but I do > not get any response in the DataAvailable callback. No because of the

Re: [twsocket] UDP Newbie...

2008-03-31 Thread Wilfried Mestdagh
Hello Mark, > 1. Do I need two TWSocket? One to send and one to listen? No you set it to Listen, and you can send and receive with the same. > 2. Since this is broadcast, will I receive the data I transmit in the > OnDataAvaliable callback? Yes if you broadcast then you send to yourself also. S

Re: [twsocket] THttpCli exception errors

2008-03-30 Thread Wilfried Mestdagh
Hello, OnBGException fire when exception occurs from the middle of nowhere, that is the message pump. Normally I set CanClose := True; in there and log it. Until now I never had it executed. But it can also execute if you have exceptions in your code. --- Rgds, Wilfried [TeamICS] http://www.overb

Re: [twsocket] TWSocketServer maximum productivity

2008-03-28 Thread Wilfried Mestdagh
Hello Alexander, the only limit is the OS and available RAM. This is winsock issue not ICS. You need 10 KB non-paged RAM per socket. Non paged RAM can grow in OS until maximum 1/8 of fisical RAM. Note that other programs also can use non paged memory. that is each program that uses overlapped IO

Re: [twsocket] Proxy server Example

2008-03-17 Thread Wilfried Mestdagh
Hello wayne, > example of a Proxy Server. there are at least 2 examples you can find in the user made page, that is SocketSpy and GpHttpProxy. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz -- To unsubscribe or change your settings for TWS

Re: [twsocket] .send after a .connect using UDP

2008-03-04 Thread Wilfried Mestdagh
Hello Dod, > And I can also do a .free immediately after the .send ? good question :) I think so yes because of the nature of UDP --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz -- To unsubscribe or change your settings for TWSocket mailing

Re: [twsocket] .send after a .connect using UDP

2008-03-04 Thread Wilfried Mestdagh
Hello Dod, > So may I use MySocket.Send following immediate MySocket.Connect safely Yes using UDP you can do that without any problem. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz -- To unsubscribe or change your settings for TWSocket ma

Re: [twsocket] SMTP Client and Streams

2008-02-20 Thread Wilfried Mestdagh
streams over there. Maybe a day work or so, maybe little longer with test case.. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Wednesday, February 20, 2008, 08:27, Veit Zimmermann wrote: > Wilfried Mestdagh wrote: >> Hello Arno, >

Re: [twsocket] SMTP Client and Streams

2008-02-19 Thread Wilfried Mestdagh
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

Re: [twsocket] Invalid Window Handle when Application Closed and Active Connections

2008-02-19 Thread Wilfried Mestdagh
es more insight; > On Feb 19, 2008 4:30 PM, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote: >> Hello wayne, >> >> possible you destroy something that also is destroyed by the application >> ? >> >> --- >> Rgds, Wilfried [TeamICS] >> http://www.over

Re: [twsocket] Invalid Window Handle when Application Closed and Active Connections

2008-02-19 Thread Wilfried Mestdagh
Hello wayne, possible you destroy something that also is destroyed by the application ? --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Tuesday, February 19, 2008, 13:20, wayne forrest wrote: > Hello, > I get an Error when I close my Server

Re: [twsocket] Whick ports are required for TFTPClient

2008-02-08 Thread Wilfried Mestdagh
Hello Andy, If you are behind a router then you have to switch to passive mode. This means that the FTP server will listen on another port for the data transfer and the client will then connect to that port. In normal mode the client will listen on another port but blocked by the router. --- Rgds

Re: [twsocket] Access Violation at Address 00000 - When Client App terminates

2008-02-06 Thread Wilfried Mestdagh
or Code for the Current Thread: > as in > if aThread.ErrorFree then begin > // do my send operations. > end; > Thank you. > On Feb 6, 2008 11:09 AM, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote: >> Hello wayne, >> >> Yes you probably access an o

Re: [twsocket] Access Violation at Address 00000 - When Client App terminates

2008-02-06 Thread Wilfried Mestdagh
Hello wayne, Yes you probably access an object that never has created, or there is some pointer overwritten. When you have the exception view the call stack window to go to the offending code. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz W

Re: [twsocket] TCP and fragmentation

2008-02-01 Thread Wilfried Mestdagh
Hello Markus, With so small packets I think you will have them complete most at the time. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Thursday, January 31, 2008, 19:43, Markus Humm wrote: >> Hello Markus, >> >> Fragmentation has nothing

Re: [twsocket] Send Integer ?

2008-02-01 Thread Wilfried Mestdagh
as : > ~~ > aThread.Connection.WriteInteger(ImageStream.Size, true); // network byte > Order > On Jan 31, 2008 6:58 PM, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote: >> Hello wayne, >> >> Send(TheNumber, 4); >> It wi

Re: [twsocket] Send Integer ?

2008-01-31 Thread Wilfried Mestdagh
Hello wayne, Send(TheNumber, 4); It will send in little endian format (as Intel CPU store it). --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Thursday, January 31, 2008, 15:24, wayne forrest wrote: > I am busy converting an Indy Application

Re: [twsocket] Monitor TWSocket listening status

2008-01-31 Thread Wilfried Mestdagh
Hello Patrick, You can also write an event handler in OnSessionClose event. From ther you can post a message to a custom message handler to let it listen again. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Thursday, January 31, 2008, 13:24

Re: [twsocket] TCP and fragmentation

2008-01-30 Thread Wilfried Mestdagh
Hello Markus, Fragmentation has nothing to do with ICS, it is IP issue and you cannot influence it. I think if you send packets smaller than MTU then chance is lower that you get fragmentation. Also I think on a busy network chance is higher. But what is the problem? Wy take the risk? Just concate

Re: [twsocket] How to return a socket error

2008-01-22 Thread Wilfried Mestdagh
Hello Bart, Just close the listening socket. If nobody is listening winsock will give a 10061. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Tuesday, January 22, 2008, 20:19, Bart Thompson wrote: > I am using a TWSocket in an application

Re: [twsocket] smtp component not connected/ready

2008-01-07 Thread Wilfried Mestdagh
Hello retnyg, You call RSet if you have an error. If you have an error just call Abort and try later again. Also check on any error, not only between those values: if Error <> 0 then begin FSmtp.Abort; SetSomeRetryMechanism; // retry with a timer or by posting a message Exit; end; --- R

[twsocket] Smtp component not ready

2008-01-06 Thread Wilfried Mestdagh
Hello Jonathan, I don't understeand the first part of your mail, but the 'smtp component not ready' is because it is probably already busy with a request. All functions are async and return immediatly while the component will to the job in background. So while it is busy yuu cannot do another requ

Re: [twsocket] Memory leaks...

2008-01-05 Thread Wilfried Mestdagh
Hello Mark, When you call connect the function returns immediatily, but the connection happens in background. So it is normal there is memory allocated. Needed memory is not nececarely a leak. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz S

[twsocket] httpprot urlencode and urldecode

2007-12-26 Thread Wilfried Mestdagh
Hello, on top of HttpProt.pas: Mar 12, 2002 Added UrlEncode and UrlDecode functions But I cannot find them. Never implemented ? -- Rgds, Wilfried http://www.mestdagh.biz -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/list

Re: [twsocket] [OT] Merry Christmas !

2007-12-24 Thread Wilfried Mestdagh
merry christmas and a happy new year for everygbody, and for the next year a good health and very interesting projects ! --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Monday, December 24, 2007, 10:11, Dod wrote: > Merry Christmas and a Happ

Re: [twsocket] Recovering from Error 10555, No buffer space available

2007-12-15 Thread Wilfried Mestdagh
Hello Angus, there was another one (forgot wich one). you need to see how many in use for non-paged memory (used by socket and overlapped IO). --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Saturday, December 15, 2007, 19:16, Angus Robertson

Re: [twsocket] Recovering from Error 10555, No buffer space available

2007-12-15 Thread Wilfried Mestdagh
Hello Angus, I recall it is winapi call GlobalMemoryStatus. It fills a struct and one of the members of the struct is the available RAM. 1/8 size of ram is the maximum amount of non pageable memory the machine can grow. So that is the max amount available for sockets and overlapped IO. --- Rgds,

Re: [twsocket] Why does listening TWSocket reset defaults on close?

2007-12-14 Thread Wilfried Mestdagh
Hello Éric, It is by design, so no bug. I forgot the reason because it is so long ago, but you have to set addr, port, proto before call Listen and also before calling Connect; --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Friday, December

Re: [twsocket] Closing connection in OnDataAvailable retriggers event

2007-12-13 Thread Wilfried Mestdagh
at 02:16, Wilfried Mestdagh wrote: >> So if Receive returns -1 or 0 (error or closed) nothing happens. There >> is one thing. If you use linemode and there is a partial line receive, >> then OnDataAvailable will fire with the part of the received data. > What do you mean a &q

Re: [twsocket] Closing connection in OnDataAvailable retriggers event

2007-12-12 Thread Wilfried Mestdagh
Hello dz, You can use CloseDelayed. And the safe thing in OnDataAvailable is like this: Count := Receive(Buffer, BytesFree); if Count <= 0 then Exit; // hier you go on doing the rest of the stuff So if Receive returns -1 or 0 (error or closed) nothing happens. There is one thing. If you use l

Re: [twsocket] WSocketTS won't build in d2

2007-12-06 Thread Wilfried Mestdagh
Hello Ron, from the top of my head (could be wrong for the TagMsg): procedure FreeAndNil(var Obj: TObject); begin Obj.Free; Obj := nil; end; LongWord is a Cardinal TagMsg is TMessage --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz

Re: [twsocket] ASyncReceive and wsoNoReceiveLoop

2007-12-04 Thread Wilfried Mestdagh
Hello Jake, > However, I would like this code to work/receive as fast as possible. The > comment in the code where wsoNoReceiveLoop was introduced says that this > option gives "lower resource usage with really fast LAN and large > transfers". Does that mean it's faster, or just uses less memory

Re: [twsocket] Multi Thread error.

2007-11-30 Thread Wilfried Mestdagh
Hello Yvan, It is only one memory location because it is just a typecast, no converstion is done. Can you tell also what access violation it exacly is ? Are you calling sendStr from same thread context as the one where TWSocket is created ? --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/en

Re: [twsocket] TWSocketServer and backlog

2007-11-29 Thread Wilfried Mestdagh
Hello DZ-Jay, So conclusion is that increasing the backlog does: - decrease the performance for accepting connections - decrease the overall performance of the application Also: - connecting clients should have a range of retry's when refused, eventually with a random small delay. For yo

Re: [twsocket] ASyncReceive and wsoNoReceiveLoop

2007-11-29 Thread Wilfried Mestdagh
Hello Jake, > attempt to do a Receive, which would return -1 along with the "Would > Block" winsock error. You don't have to handle GetLastError. Just check the Error argument in every event. The 'Would block' thing is internally handled by TWSocket. If Receive returns 0 or -1 then just exit the

Re: [twsocket] TWSocketServer and backlog

2007-11-28 Thread Wilfried Mestdagh
Hello dz, I think 5 is the winsock default value --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Wednesday, November 28, 2007, 19:01, [EMAIL PROTECTED] wrote: >>--- Original Message --- >>From: Paul[mailto:[EMAIL PROTECTED] >>

Re: [twsocket] TWSocketServer and backlog

2007-11-28 Thread Wilfried Mestdagh
Hello dz, a client application should do at least a few (or infinity) retry's if connection fails. so normally not needed to increase it. On the other hand it does no harm to increase it. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Wednes

Re: [twsocket] I need some help understanding TWsocket states

2007-11-28 Thread Wilfried Mestdagh
Hello Pete, >mytwsocket.addr := '127.0.0.1'; >mytwsocket.port := '17072'; >mytwsocket.connect(); that's ok > OnSessionAvailable doesn't seem to get called ever. No you need OnSessionConnected. OnSessionAvailable is for server sockets. > In OnDataSent I do this > begin

Re: [twsocket] I need some help understanding TWsocket states

2007-11-26 Thread Wilfried Mestdagh
Hello Pete, > if myclient.state <> wsConnected then > begin > myclient.connect; > loop for 5 seconds begin You have to think async. TWSocket uses events. think on events as a OnClick event of a butten. You don't write loops to wait until a user click a button. So you have to change to:

Re: [twsocket] Design isue

2007-11-26 Thread Wilfried Mestdagh
Hello Albert, You only need a threaded approach if you have to run very long code, meaning if your code (for example to parse incoming data, or to get data that need to be sent or so) is long (so blocking). when you write code in non threading design, the time your code is executing nothing else

Re: [twsocket] TWSocket component within DLL

2007-11-26 Thread Wilfried Mestdagh
Hello Pete, set it to True, then TWSocket uses his own mesage pump, otherwise the TApplication mesage pump is used. --- 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 go

Re: [twsocket] TWSocketThrdServer

2007-10-16 Thread Wilfried Mestdagh
Hello Ana, > I have other doubt. The application has data to server and the > server has to send them to the clients. How can i do this? > In the examples, i don't understand how the server send data to clients. For each client taht connect to the server, TWSocketServer create a data socket (you

Re: [twsocket] problem with TCP server

2007-10-15 Thread Wilfried Mestdagh
Hello João, If you use UDP then when the receiving machine is busy and packet arrive then it is lost. So you have to optimize the parsing and saving for speed. If it is a very lenghty procedure you can give the received data to another thread to handle it. --- Rgds, Wilfried [TeamICS] http://www.

Re: [twsocket] Over TWSocketServe

2007-10-12 Thread Wilfried Mestdagh
Hello Ana, > That is deprecated means that is better to use other component? yes --- 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/l

Re: [twsocket] TWSocketThrdServer friendly notice when disconnecting.

2007-10-11 Thread Wilfried Mestdagh
Hello dz, You have to loop through the connected clients to send them a message. and send the shutdown. Take care that clients may be disconnected while in the loop, so something like this: for n := 0 to Srv.ClientCount - 1 do try Srv.Clients[n].SendStr('bye'#13#10); Srv.Clients[n].Shu

Re: [twsocket] TWSocketThrdServer stuck in destructor loop when killing threads

2007-10-04 Thread Wilfried Mestdagh
Hello dz, Change this. Its from top of my head so can be syntax errors. You have to move the destroy of the server also in the Execute mehod: Destructor TServerThrd.Destroy; Begin Try // this must in the Execute method // If Assigned(FSocketSrv) Then Begin // FSocketSrv.Fr

Re: [twsocket] TWSocketThrdServer - BogusOnDataAvailabletriggeredwhen Closed.

2007-10-03 Thread Wilfried Mestdagh
Hello dz, > Client.SendLine('-ERR Closing connection.'); > Client.Shutdown(1); // Or CloseDelayed() ...? Yes. This way you are sure that the string will be received by the other end. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz --

Re: [twsocket] TWSocketThrdServer - Bogus OnDataAvailabletriggeredwhen Closed.

2007-10-03 Thread Wilfried Mestdagh
Hello Arno, > I think the problem is that in TCustomWSocket.InternalClose the message > pump is called I think you right about that. As I recall CloseDelayed was introduced if it was needed to Close from in one of the events. Most likely that was the reason. --- Rgds, Wilfried [TeamICS] http:

Re: [twsocket] TWSocketThrdServer - Bogus OnDataAvailable triggeredwhen Closed.

2007-10-03 Thread Wilfried Mestdagh
Hello DZ-Jay, > Close() ultimately calls Shutdown(1) -- so wouldn't it have the same > effect? As I recall not exacly the same. Close calls Shutdown(1) and close the socket. If you call Shutdown(1) the socket will not be immediatly close, but if there is still some data it will be send, and the o

Re: [twsocket] Lost handles using TWSocket.

2007-10-03 Thread Wilfried Mestdagh
Hello Mitchell, Yes there should be a Connect (or Listen) before sending something. UDP is not session related but it is the way TWSocket is written. But for UDP you dont have to wait for an event, you can call Connect and in next line of code you can call SendStr. Also it is OK to Release the TWS

Re: [twsocket] Lost handles using TWSocket.

2007-10-01 Thread Wilfried Mestdagh
Hello Mitchell, > Does it seem reasonable that the Release call in Disconnect should be > changed to a Close or CloseDelayed, and the Release in SessionClosed > remain? If you wants to destroy from within an event handler then call Release. Yes it indeed post a message to destroy it outside the e

Re: [twsocket] Custom message pump: wait for attach?

2007-10-01 Thread Wilfried Mestdagh
Hello Olivier, Oke I see. But if you have all your clients attached to same thread, then it is more easyer to create / destroy the server in that thread, and you dont have to worry about it at all. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.

Re: [twsocket] Lost handles using TWSocket.

2007-10-01 Thread Wilfried Mestdagh
Hello Mitchell, Never have seen this problem, but I'm not fully understeand. You talk about rapid open / close, but you use UDP (wich is not session related)? Can you explain this again, maybe I have misunderstood. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http

Re: [twsocket] TWSocketThrdServer graceful shutdown

2007-09-28 Thread Wilfried Mestdagh
Friday, September 28, 2007, 20:36, Arno Garrels wrote: > Wilfried Mestdagh wrote: >> Hello Arno, >> >>> Most likely Wilfried is faster again ;-) >> >> most of the time you are faster :) > Isn't this list great? Where else do you get faster support fo

Re: [twsocket] TWSocketThrdServer graceful shutdown

2007-09-28 Thread Wilfried Mestdagh
Hello Arno, > Most likely Wilfried is faster again ;-) most of the time you are faster :) --- 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/

Re: [twsocket] TWSocketThrdServer graceful shutdown

2007-09-28 Thread Wilfried Mestdagh
Hello dz, Just call Close method. server will stop listening. Note that calling Close will not stop current connections, it only stops listening. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Friday, September 28, 2007, 17:44, [EMAIL PROTEC

Re: [twsocket] Socket errors in the Wiki?

2007-09-28 Thread Wilfried Mestdagh
Hello Fredrik, I think the FAQ is the right place, as the winsock errors are interesting for each component. I have a short listing on my site at the ICS FAQ without additional explanation. Maybe this is already a start ? --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.ht

Re: [twsocket] Custom message pump: wait for attach?

2007-09-27 Thread Wilfried Mestdagh
Hello Olivier, I dont have the demo at hand. But if all your clients are executing in same thread context you do not have to lock things between the clients itself. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Thursday, September 27, 2007,

Re: [twsocket] 100% CPU usage if data is not processed immediately

2007-09-27 Thread Wilfried Mestdagh
Hello Olivier, > I can't use LineMode, what is transferred is purely binary. See http://wiki.overbyte.be/wiki/index.php/Sending_and_receiving_data that discusses some possible data transfer modes. > buffer and rely on the one from the API itself. > I tried it, it works fine, but is it be a "nice

Re: [twsocket] newb using TWSocket for the first time

2007-09-26 Thread Wilfried Mestdagh
gt; OnDataAvailable event. > How may this be prevented? I cannot disable all messge processing in > my app whilst it's in the OnDataAvailable event. > On 26/09/2007, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote: >> Hello David, >> >> Eventually you can check

Re: [twsocket] 100% CPU usage if data is not processed immediately

2007-09-26 Thread Wilfried Mestdagh
p://www.mestdagh.biz Wednesday, September 26, 2007, 15:38, Olivier Sannier wrote: > Wilfried Mestdagh wrote: >> Hello Olivier, >> >> >>> The NotifyDataAvailable sets a flag in an object associated to the >>> client socket that will then read

Re: [twsocket] Newbie question : Working with Long strings

2007-09-26 Thread Wilfried Mestdagh
Hello Clément, > Ok. But can I place a LineLimit over 200kbytes? or better yet, > unlimited? (those help files can get very big may be over 1Mb) Yes. Since you connect to a known server you dont have to be afraid of a DOS attac. So set LineLimit := $7FFF; which is the highest possible value.

Re: [twsocket] 100% CPU usage if data is not processed immediately

2007-09-26 Thread Wilfried Mestdagh
Hello Olivier, > The NotifyDataAvailable sets a flag in an object associated to the > client socket that will then read the available bytes. But it will not > do so immediately That's the problem. You have to read "all" available data "In" the OnDataAvailable event. If you do not then OnDataAvail

Re: [twsocket] newb using TWSocket for the first time

2007-09-26 Thread Wilfried Mestdagh
Hello David, Eventually you can check with SocketSpy what exacly is sent. --- 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/

Re: [twsocket] newb using TWSocket for the first time

2007-09-26 Thread Wilfried Mestdagh
Hello David, > On a certain XML packet/event I'm getting duplicates (x3). It may > well be that they are sending the same packet multiple times but I > wondered if it's anything I am doing that could cause this? Something that can cause this (and other strange behaviour) is if you call direct or

Re: [twsocket] Newbie question : Working with Long strings

2007-09-25 Thread Wilfried Mestdagh
Hello Clément, > I searched some examples, but most of them use LineMode and LineLimit. I'm > afraid > that's not an option. Wy is that not an option ? What is the problem with it ? Just terminate your data with a charcter that cannot be in the data itself and your whole problem is solved. >

Re: [twsocket] How to know if a port is being used

2007-09-15 Thread Wilfried Mestdagh
Hello Éric, Just call Listen method in an exception block. If exception then choose another port and call Listen again, and so on. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Saturday, September 15, 2007, 19:09, Éric Fleming Bonilha wrote

<    1   2   3   4   5   6   7   8   >