Re: [twsocket] FTPCli: Lose Socks settings in DataSocket on Close

2008-08-27 Thread Dan F
Regarding the type setting, you could derive your own component which keeps
a flag of the last type sent (binary or ascii) and before doing any store or
retrieve you could check if the binary property matched your flag.  If not,
send the TYPE command and update your flag.  This will avoid repeatedly
sending the command, but will mean you don't have to worry about the wrong
type being set, as long as the binary property is set as you want before an
operation.

Dan

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of Anton Sviridov
> Sent: 25 August 2008 12:55
> To: twsocket@elists.org
> Subject: [twsocket] FTPCli: Lose Socks settings in DataSocket on Close
> 
> > Yes they do, since they only want to send it once when downloading
> 1,000
> > files or directories, not 1,000 times.
> 
> I suppose it''s better to waste 0.5 sec and 10 bytes of traffic on
> setting type each time before download than constantly keep in mind,
> what type is set now and whether we have to change it or not. Of
> course, it''s just a my opinion.
> 
> Another issue I noticed is a strange behavior with LocalStream. It
> supposed to be an external object, created outside FTPCli. So who has
> given the component a right to Destroy it in DestroyLocalStream?
> I''ll describe step by step.
> 
> 1) Create SomeStream in the main program
> 2) Create FTPCli, all stuff
> 3) Assign FTPCli.LocalStream to SomeStream
> 4) Perform dir listing, parsing received info and so on
> 
> -- until that FStreamFlag prevents LocalStream from destroying --
> 
> 5) Start downloading files, (!!!) Set LocalFileName. FStreamFlag
> changes to False, but LocalStream is still assigned!
> 6) GetAsync destroys LocalStream, and, hence, our SomeStream.
> 7) So we have SomeStream which points to nothing, and we are one step
> away from Access violation
> 
> Maybe I misunderstood the logic of the process, then please tell me
> which way would be right.
> But as I see, this is a kind of logical bug. Looks like the best
> solution would be setting LocalStream to nil in SetLocalFileName
> 
> --
> Best Regards, Anton
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket.Send timing

2008-05-13 Thread Dan F
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of Wilfried Mestdagh
> Sent: 13 May 2008 19:34
> To: ICS support mailing
> Subject: Re: [twsocket] TWSocket.Send timing
> 
> 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 it up by setting wsoTcpNoDelay in ComponentOptions in
> both
> ends, but this can slow down network performance. See MSDN at Microsoft
> are many articles discussing it.
> 
> ---
> Rgds, Wilfried [TeamICS]

I thought the Nagle algorithm would only apply to the speed at which the
underlying Winsock socket sends the data.  As far as I know it shouldn't
cause the TWSocket send call to take longer since that is asynchronous isn't
it?  Please correct me if I'm wrong.

Dan

-- 
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] Merry Christmas !

2008-01-01 Thread Dan
Happy new year everybody!

Dan

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of Maurizio Lotauro
> Sent: 25 December 2007 11:38
> To: ICS support mailing
> Subject: Re: [twsocket] [OT] Merry Christmas !
> 
> Scrive Francois Piette <[EMAIL PROTECTED]>:
> 
> > Hi everybody !
> >
> > I want to wish a Merry Christmas and a Happy New Year to you and your
> > families.
> 
> Merry Christmas and a Happy New Year to everybody from Italy!
> 
> 
> Bye, Maurizio.
> 
> 
> This mail has been sent using Alpikom webmail system
> http://www.alpikom.it
> 
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Very strange error (Windows or my application?)

2007-10-20 Thread Dan
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of Fastream Technologies
> Sent: 20 October 2007 08:23
> To: ICS support mailing
> Subject: [twsocket] Very strange error (Windows or my application?)
> 
> Hello,
> 
> We have acquited a dedicated server which has a domain being DDoS
> attacked
> by 1000 clients(!). When I leave the server on its own, our IQRP
> process
> consumes 95% CPU. After a while, it goes to 0% and it stops accepting
> new
> connections. Moreover, the RDP session is also terminated! I cannot
> control
> the server anymore..! The only solution is to remote reboot. Any idea
> what
> could cause this?
> 
> Best Regards,
> 
> SZ

Acquited? It sounds like the DDoS is causing it.  Talk to your ISP about
getting firewalled further upstream.

Dan


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] A TFtpCli application performance question

2007-10-16 Thread Dan
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of Arno Garrels
> Sent: 16 October 2007 13:24
> To: ICS support mailing
> Subject: Re: [twsocket] A TFtpCli application performance question
> 
> Tobias Rapp wrote:
> > Also do not forget to play with the BufSize and SocketSndBufSize
> > settings on tWSocket. I made good experiences when using values of
> > ~1MB. The default value for both settings is very low (at least for
> > file delivery purposes).
> 
> But upload of large files is pretty fast, the problem seems to be with
> plenty of small files only, see my previous message.
> 
> >
> > /Tobias
> >

The FTP protocol is really slow for many small files because of the many
roundtrip commands and replies, and the new data connection for each file.
The only way you're going to achieve a decent speed is by using multiple
connections. (or changing protocol :) - if you don't need to specifically
support FTP servers, have a look at rsync - not sure if the protocol is
open, but it supports pipelining and zlib compression making it very fast).

Dan


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Using SourceForge for ICS ?

2007-10-04 Thread Dan
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of Olivier Sannier
> Sent: 02 October 2007 18:22
> To: ICS support mailing
> Subject: Re: [twsocket] Using SourceForge for ICS ?
> 
> SVN is meant to replace CVS so the natural choice would be SVN. AFAIK,
> CVS services are only on SourceForge for legacy reasons but SVN is the
> new favored backend. I personally much prefer SVN as it allows far
> greater flexibility in terms of file operations, like move, renaming,
> and the like. Of course, and its the same with both, you have to accept
> the "never lock, always merge" mechanism but it comes naturally after
> about 15 minutes of using it.
> 
> If you have any question, please do not hesitate to contact me.
> Cheers
> Olivier
> 

SVN does actually support locking files aswell. Useful for binary files that
you can't merge.

Dan


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Using SourceForge for ICS ?

2007-10-04 Thread Dan
I've moved to SVN for all my projects.  Its definitely superior to CVS.
Glad you are finally choosing to use version control :) you wont regret it.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Francois PIETTE
Sent: 02 October 2007 17:55
To: twsocket@elists.org
Subject: [twsocket] Using SourceForge for ICS ?

Hello Guys !

I'm considering the option of pushing ICS to SourceForge and I would like to

have your opinion.
Does someone already have a real experience of SourceForge as a developper ?
The first decision is should I select CVS or SVN ?
Any advice appreciated.

--
[EMAIL PROTECTED]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Questions about FTPClient

2007-03-31 Thread Dan


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Arno Garrels
> Sent: 31 March 2007 13:57
> To: ICS support mailing
> Subject: Re: [twsocket] Questions about FTPClient
> 
> Dan wrote:
> >> -Original Message-
> >> From: [EMAIL PROTECTED] [mailto:twsocket-
> >> [EMAIL PROTECTED] On Behalf Of Arno Garrels
> >> Sent: 31 March 2007 12:24
> >> To: ICS support mailing
> >> Subject: Re: [twsocket] Questions about FTPClient
> >>
> >> Dan wrote:
> >>>> So obviously those keepalive packets do not reset the timeout
> >>>> (where ever it happens) however sending some bytes may help, see
> >>>> above.
> >>>>
> >>>
> >>> Try sending the NOOP command periodically whilst
> >>> downloading/uploading. Most servers should support this.
> >>> Not sure
> >>> how the component will handle the response if it's waiting for the
> >>> response from the GET/PUT though.
> >>
> >> You are right!
> >> A response to a NOOP before GET/PUT finished would kill a transfer.
> >> However some (most?) servers queue client requests, the NOOP
> >> responses would the be received after the transfer completed. ICS
> >> FTP server does not queue requests.
> >
> > In my experience, most FTP servers treat a NOOP in a special way and
> > will process it and reply even during a transfer.  It's worth a try.
> 
> If they reply at once the client would treat the NOOP-response as an
> response to GET/PUT, thus data socket will be closed, see procedure
> TCustomFtpCli.Next2GetAsync. The FTP server of my ISP however doesn't
> reply until PUT/GET completed, just tested. Instead, after the download
> succeeded I was bombed with plenty of NOOP-responses.
> 

Yes, the client would have to be modified in case the server replies to the
NOOP during the transfer.  I haven't used them for a while but I believe
DrFTPd, Serv-U and glftpd do this.  I also remember it was a reply code that
could be differentiated from the usual data transfer replies.

Anyway, whether the server replies during or after the transfer, it should
be sufficient to keep the connection alive as routers will see the data
being transmitted.

Dan


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Questions about FTPClient

2007-03-31 Thread Dan

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Arno Garrels
> Sent: 31 March 2007 12:24
> To: ICS support mailing
> Subject: Re: [twsocket] Questions about FTPClient
> 
> Dan wrote:
> >> So obviously those keepalive packets do not reset the timeout (where
> >> ever it happens) however sending some bytes may help, see above.
> >>
> >
> > Try sending the NOOP command periodically whilst
> > downloading/uploading. Most servers should support this.
> > Not sure
> > how the component will handle the response if it's waiting for the
> > response from the GET/PUT though.
> 
> You are right!
> A response to a NOOP before GET/PUT finished would kill a transfer.
> However some (most?) servers queue client requests, the NOOP responses
> would the be received after the transfer completed. ICS FTP server
> does not queue requests.

In my experience, most FTP servers treat a NOOP in a special way and will
process it and reply even during a transfer.  It's worth a try.

Dan


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Questions about FTPClient

2007-03-31 Thread Dan
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Arno Garrels
> Sent: 30 March 2007 19:58
> To: ICS support mailing
> Subject: Re: [twsocket] Questions about FTPClient
> 
> Arnau Font wrote:
> >>
> >> Also, I'm having trouble with slow transmissions. When a download
> >> lasts more
> >> than 20 minutes the component seems to freeze,
> 
> Does "freeze" mean that the GUI is not repainted?
> 
> >> and the component
> >> remains in
> >> ftpWaitingResponse.
> 
> If the GUI _is repainted, I guess a router/proxy problem.
> I recently experienced the same in a non-FTP application.
> We solved it by sending some 'real' keepalive bytes from
> our client application in regular intervals, triggered by a timer.
> The problem with TFtpCli however is that you cannot send a command
> while another command is still waiting for a reply. So my only
> idea is to try to send some raw, fake FTP-command thru
> FtpCli.ControlSocket.SendStr() to keep the control connection
> alive, some command that does not require a data socket.
> 
> >> It seems that it doesn't receive the confirmation
> >> (FServerSaidDone still remains at false). I suspect that, as the
> >> control
> >> socket is idle all this time, some device closes it and I can't
> >> receive the
> >> server confirmation, I only get the DataSocketGetSessionClosed event.
> >>
> >> I'm behind an ISA Server, I suppose that it closes the control
> >> socket, as it
> >> isn't sending anything. How can I avoid that?
> >
> > In latest downloads there's a new public property KeepAliveSecs to
> > enable keepalive packets on the control socket, this should avoid
> > the connection from being closed on inactivity.
> >
> > I've downloaded the lastest v6 beta, but is still doesn't work. I've
> > set the
> > keepalivesecs to 60. Should I change any other property?
> 
> So obviously those keepalive packets do not reset the timeout (where
> ever it happens) however sending some bytes may help, see above.
> 

Try sending the NOOP command periodically whilst downloading/uploading.
Most servers should support this.  Not sure how the component will handle
the response if it's waiting for the response from the GET/PUT though.

Dan


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Possible bug and solution in TWndControl

2007-02-07 Thread Dan
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Arno Garrels
> Sent: 07 February 2007 17:08
> To: ICS support mailing
> Subject: Re: [twsocket] Possible bug and solution in TWndControl
> 
> Fastream Technologies wrote:
> >> Initialize means you assign it in an Intialization section, do you?
> >
> > There is no such technique in C++! I have an intermediate Pascal
> > class but I did not notice this technique.
> 
> I was hoping you teached me how to do the same in C++, anyway make
> sure this variable is set before any ICS V6 object is created. Most
> secure however is an initialization section. Changing it later,
> after the first number has been allocated with default value will
> probably cause errors.
> 

I think the only way is to use a static variable.  Something like this (may
contain syntax errors but you get the idea):

bool initSomething()
{
  // your initialisation code here
  return true;
}

static bool dummyBool = initSomething();

Dan


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Freeze when using smtp after recreating itsparentform

2007-01-25 Thread Dan
I thought it was figured out that dynamically unloading and reloading the
dll was the problem, which other components probably don't do, and I think
you were given a workaround that worked...to load it manually so that the
loaded count always stays above 0 and it remains loaded.

Dan

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Henrik
> Sent: 25 January 2007 16:42
> To: 'ICS support mailing'
> Subject: Re: [twsocket] Freeze when using smtp after recreating
> itsparentform
> 
> Hi Arno and others!
> 
> Some of the heavy work load I experienced a while ago has decreased a bit
> so
> I thought that I should take the opportunity to thank You ALL that tried
> to
> help me.
> 
> At the end the solution for me was to use another smtp component. Sorry
> about that. (As a request by Francois Piette I'm not going to mention it
> by
> name in this news group.)
> Even if it is like You say Arno, that the problem is not originating from
> ICS it is still toghether with the SmtpCli component the problem appears.
> This makes it impossible to use the SmtpCli component knowing that users
> might not be able to use our application under certain _normal_
> circumstances (like in our test case with a new Dell laptop). We can not
> tell our users that they have to uninstall other softwares just to be able
> to send emails from our application.
> Even if it is not a bug in ICS code or design the fact remains: Other smtp
> components out there works just fine under the same circumstances. So that
> was why I was forced to take that path.
> 
> But once again: Thank You all for the help! You are doing a wonderful job!
> Best Regards
> Henrik
> 
> 
> 
> Arno Garrels wrote:
> > The problem is *not a bug in ICS*. Instead another process
> > injects and executes its own, buggy code in the process space
> > of the ICS-application. Detoured.dll is used for hooking API
> > calls. The hooking application is the culprit!
> > That must not be a virus or trojan but may be any other
> > application/service or security suite as well.
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] WinSock error 10035 with TWSocketServer

2007-01-17 Thread Dan


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of [EMAIL PROTECTED]
> Sent: 17 January 2007 22:12
> To: twsocket@elists.org
> Subject: Re: [twsocket] WinSock error 10035 with TWSocketServer
> 
> Hi Dan,
> 
> > > >   TWSocketClient* Client = dynamic_cast(Sender);
> > > >   AnsiString msg = Client->ReceiveStr();
> > >
> > > The first line will execute, I think the second line will generate an
> > > exception here. I4m not sure. Did you have it into an exception block
> ?
> > >
> > > As far as I know the dynamic_cast is a kind of equivalent for 4is4 or
> > > 4as4 operators in Delphi and some other languages. It is not the same
> as
> > > a type cast. I even think it will evaluate to false (null) because
> > > Sender is of type TObject (yeah it "is" TWSocketClient, but compiler
> > > dont know that).
> >
> > A dynamic cast is safer.  Yes its similar to Delphi4s as/is operators.
> In
> > this case, this a pointer dynamic cast (rather than a reference), it
> will
> > return null/nil if Sender isn4t really a TWSocketClient, and the code
> should
> > then check for this.  An alternative is to use a reference:
> >
> >  TWSocketClient& Client = dynamic_cast(Sender);
> 
> But Sender is a pointer - I didn't think you could typecast a pointer to a
> reference.
> 
> Regards,
> 
> Bevan
> 

Oops, you're right. *Sender.

Dan


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] WinSock error 10035 with TWSocketServer

2007-01-17 Thread Dan
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Wilfried Mestdagh
> Sent: 13 January 2007 17:07
> To: twsocket@elists.org
> Subject: Re: [twsocket] WinSock error 10035 with TWSocketServer
> 
> Hello Bevan,
> 
> I'm not a CBuilder specialis but:
> 
> >   AnsiString msg = ((TWSocketClient*) Sender)->ReceiveStr();
> 
> This is a good typecast. It tells the compiler that Sender is of type
> TWSocketClient, so compiler can do the exact address offset
> calculations within the type. You still have to check if msg is > "".
> 

Its ok if you are sure that Sender is a TWSocketClient.  Otherwise its very
unsafe.

> >   TWSocketClient* Client = dynamic_cast(Sender);
> >   AnsiString msg = Client->ReceiveStr();
> 
> The first line will execute, I think the second line will generate an
> exception here. I'm not sure. Did you have it into an exception block ?
> 
> As far as I know the dynamic_cast is a kind of equivalent for 'is' or
> 'as' operators in Delphi and some other languages. It is not the same as
> a type cast. I even think it will evaluate to false (null) because
> Sender is of type TObject (yeah it "is" TWSocketClient, but compiler
> dont know that).

A dynamic cast is safer.  Yes its similar to Delphi's as/is operators.  In
this case, this a pointer dynamic cast (rather than a reference), it will
return null/nil if Sender isn't really a TWSocketClient, and the code should
then check for this.  An alternative is to use a reference:

 TWSocketClient& Client = dynamic_cast(Sender);

which will throw an exception if Sender isn't a TWSocketClient at runtime.
This is the safest way, it's better to have an exception than to treat an
object as a different class (which could result in memory corruption).

Dan


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Throttling solution - Integrate Dan's throttler into ICS?

2006-12-20 Thread Dan
Sorry for the late reply.  I still have about 200 messages to catch up on
since I took a break.

I haven't converted it to V6 yet but I plan to in the future.  You are
welcome to try before me :)

Regards,
Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Marc
Sent: 14 December 2006 03:39
To: ICS support mailing
Subject: Re: [twsocket] Throttling solution - Integrate Dan's throttler into
ICS?

Hi Dan

Did you update it for V6 ?
Or currently it only work for V5 ?

Thanks

Marc

At 17:22 2006-12-10, you wrote:
>Hi Jack,
>
>You should be able to derive your own class from TWSocketServer which
>instantiates throttled sockets instead of regular ones.  Then you don't
have
>to modify ICS code.  I did it for the FTP server component, I can upload it
>somewhere if you want.  Let me know if you do this and maybe you could make
>the code available to others.
>
>Regards,
>Dan

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
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] Flow control

2006-11-19 Thread Dan
Partially correct.  You don't need an extra FIFO buffer externally to
TWSocket because TWSockets buffers are FIFO buffers.  You are right that
these will grow until you run out of memory if you cant send data as fast as
you receive it.  But you said in your case you cannot control the rate your
random is arriving at (or did I misinterpret?) so what else can you do
except keep buffering it, or error?  You could write your own buffering to
disk I suppose...

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Angus Robertson - Magenta Systems Ltd
Sent: 19 November 2006 11:22
To: twsocket@elists.org
Subject: Re: [twsocket] Flow control

> Use event OnDataSent to control the flow, and to avoid grow of 
> TWSocket's send buffer.

That is impossible for random data, unless an extra FIFO buffer is used 
externally to TWSocket.  

Trying to understand how TIcsBufferHandler works, it appears to be 
multiple 1,460 byte blocks (TIcsBuffer), with new blocks being added if 
data can not be sent sufficiently fast.  

So I guess the answer to my question is there is no flow control and the 
buffers will just keep growing if data can not be sent fast enough, 
until the application runs out of memory. 

Angus
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Multi-Threaded THttpServer?

2006-11-18 Thread Dan
You could either:
(1) Not reply to the client until after 10 seconds (using a TTimer?).  You
don't have to sleep.  I'm sure the HTTP server has some kind of delayed
reply mechanism.  You can put the client in a 'waiting' list and only send
the reply after your timeout.

(2) Have the client only retry after 10 seconds.  There is a header you can
send to get the client to refresh to a new URL after so many seconds.  Many
sites use it for redirects...they redirect after 5 seconds for example.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Cosmin Prund
Sent: 18 November 2006 12:55
To: ICS support mailing
Subject: [twsocket] Multi-Threaded THttpServer?

Hello!

Here's me again, trying to do strange things. I'm working on a HelpDesk 
application that should include a Chat function, amongst other things. I 
want to do it all using HTTP only (that is, no direct connection, 
everything needs to be pure HTTP). I really want this HTTP-only thing 
because I want my application to work in places where my clients only 
have access to the Internet using an HTTP Proxy!

The chat application has 2 basic components: send your text, receive 
text sent by the other party. The "send your text" is really easy, but 
the "receive text sent by the other party" part is a bit more difficult, 
because I can't keep an open connection between client and server, I 
need the client to pool for text sent from the server! That is, the 
client will GET a document of the following format:
http://myserver.server.ro/getchat?conversation=12346&seq=1
The server should return any available text for the given conversation 
or an NOP if no text is available. But here's a trick: If there's no 
text available for the connection I would like to delay returning an NOP 
until there IS some text available, or until a 10 seconds delay elapses. 
This would stop the client from going into a bandwidth-consuming busy-loop.

Unfortunately THttpServer doesn't include a "MultiThreaded" checkbox 
like TSocketServer does, and I'm not sure what I should do to Sleep() 
without actually freezing the server in the process! I might try 
subclassing THttpServer and setting FWSocketServer.MultiThreaded = True 
in CreateSocket but I know too little about the internals of THttpServer 
and ICS in general to understand the consequences of doing this.

Any help on the matter is welcomed, thanks.

--
Cosmin Prund
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] IP Plug and Play or IPV6

2006-10-22 Thread Dan
I don't agree.  It makes things very convenient for the end user, especially
today when a lot of people are behind NAT routers.  The only way I can see
it being a security hole is if you have some malicious executable running
behind your router.  If that is the case, the fact it can get your router to
forward incoming connections isn't that significant, since it can easily
connect outwards, or delete your data anyway...

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Francois PIETTE
Sent: 22 October 2006 17:03
To: ICS support mailing
Subject: Re: [twsocket] IP Plug and Play or IPV6

In my opinion, UPnP /is/ a large hole in security. It is disabled on my 
router.

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be



- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Sunday, October 22, 2006 3:43 PM
Subject: Re: [twsocket] IP Plug and Play or IPV6


> One addition to your answer: There is a standard called UPnP
> (Universal Plug and Play) which enables supporting routers to be able
> to be configured by software (not have to log in via the web interface
> but they provide some sort of low level web service). This is used for
> forwarding NAT ports.
>
> Regards,
>
> SZ
>
> On 10/22/06, Francois PIETTE <[EMAIL PROTECTED]> wrote:
>> > Is this how somehing like Kazaa works.?
>>
>> This is how any p2p system works. There is are only two possibilities:
>> 1) A given computer can receive incomming connections
>> 2) A given computer cannot receive any incomming connection
>>
>> The case (1) occur when the computer is behind a fixewall, a proxy, a NAT
>> router or other kind of security product which need to be configured to
>> allow incomming connections. Most profesionnal users are in that 
>> situation.
>> The case (2) occur for computer directly connected to the internet and
>> having no firewall of security product installed. Many home user fall 
>> into
>> this case which is very risky in term of security.
>>
>> With case (1), if both computers are in that case, you either have to use

>> an
>> intermediate server or have one of the computers configured to accept
>> incomming connections (and thus fall into case (2)).
>>
>> With case (2), there is no problem for a computer to act as a server and
>> accept incomming connection. The paradise for p2p network (and hackers 
>> using
>> remote control software or back door software).
>>
>> --
>> Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
>> --
>> [EMAIL PROTECTED]
>> http://www.overbyte.be
>>
>>
>>
>> - Original Message -
>> From: <[EMAIL PROTECTED]>
>> To: "ICS support mailing" 
>> Sent: Sunday, October 22, 2006 11:59 AM
>> Subject: Re: [twsocket] IP Plug and Play or IPV6
>>
>>
>> > Is this how somehing like Kazaa works.?
>> >
>> > Thanks
>> >
>> > - Original Message -
>> > From: "Francois PIETTE" <[EMAIL PROTECTED]>
>> > To: "ICS support mailing" 
>> > Sent: Sunday, October 22, 2006 10:52 AM
>> > Subject: Re: [twsocket] IP Plug and Play or IPV6
>> >
>> >
>> >> > So if in those applications pc1 has the mp3 that pc2 wants how is 
>> >> > the
>> > data
>> >> > transfered.. isn't one uploading and one downloading thus a minimum 
>> >> > of
>> > one
>> >> > server needed , sorry for the not understanding.?
>> >>
>> >> When no direct connection is possible (for example the user, like me 
>> >> has
>> >> a
>> >> NAT router), then an intermediate server is used. This intermediate
>> >> server
>> >> could be one of the user in the p2p network, a user which allows
>> >> incomming
>> >> connections (What a fool !).
>> >>
>> >> --
>> >> Contribute to the SSL Effort. Visit 
>> >> http://www.overbyte.be/eng/ssl.html
>> >> --
>> >> [EMAIL PROTECTED]
>> >> http://www.overbyte.be
>> >>
>> >>
>> >>
>> >>
>> >> > - Original Message -
>> >> > From: "Francois PIETTE" <[EMAIL PROTECTED]>
>> >> > To: "ICS support mailing" 
>> >> > Sent: Sunday, October 22, 2006 10:02 AM
>> >>

Re: [twsocket] FtpCli upload problem

2006-09-21 Thread Dan
Not sure why it happens, but to guard against this I would do a SIZE command
on the remote file after uploading it, then check if it matches the local
file size before deleting it.  SIZE is supported by every FTP server I have
used, although I'm not sure if its in the initial FTP RFC.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of New Era
Sent: 21 September 2006 12:10
To: twsocket@elists.org
Subject: [twsocket] FtpCli upload problem


 [input][input][input][input]

I am using the following code in the FtpRequestDone event handler;

case RqType of
...


ftpPutAsync: begin
if(FtpCli.StatusCode= 226) then Delete(FileName);
   
end;

   
end;
What I am trying to do is to upload a file to server then delete the 
local file. In fact this code is working for the many cases but there are 
a few cases where the server says that uploaded files (local file sizes 
are greater than 0 bytes) are zero bytes length and the localfile is 
deleted. What is wrong? I am using passive mode.

thanks.
  

-
 Try the all-new Yahoo! Mail . "The New Version is radically easier to use"
- The Wall Street Journal
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] complex problem, probably not ICS related

2006-09-15 Thread Dan
Try disabling your thread sleeping (the thread that reads from the
StringList).  Does your stringlist get all the the requests? i.e. is
TWSocket receiving them and your code parsing and putting them in the list
correctly?

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Markus Humm
Sent: 14 September 2006 21:54
To: ICS support mailing
Subject: [twsocket] complex problem, probably not ICS related

Hello,

sorry, this will be just a tiny bit longer... ;-)

I'm currently building some large application where several parts will
act together. Two of them are connected via TCP and TWSocket. One is
client and one server (okay there is TWSocketServer, but since there's
always a 1:1 relation between them and I don't have time to learn [and
wikify] all ICS components right now...).

The client sends requests to the server and the server will send back
the replies in the same format. This format is as follows:

1 integer defining the length of my packet
1 integer some ID I need
x byte the other needed data, can be any size but mostly < 100 bytes
1 word CRC so that it doesn't get too easy to spoof my connection.

The receiver puts incomming bytes into a ringbuffer with a greater size
than the buffer where TWSocket.receive puts the data in in the first
place. Then it checks whether there are packets of my format in the
ringpuffer and as long as there is one, one is fetched and given to a
callback in my application. There the syntax of the x byte is checked
and it is added to a TStringList. Reading and writing to the TStringList
is protected by the same critical section.

On the other side of the TStringList is a thread which will fetach one
entry and process it (will take around 50ms), but requests can come in
as fast as possible, thus this TStringList. If no requests are left in
the TStringList the threads gets sleepy (GetMessage) until something is
put into the TStringList again, which also will inform the Thread via
PostThreadMessage.

Replies generated from processing will be in the same packet format and
will be stored in another TStringList where another thread will fetch
one after one and send them back to the requester via the same TWSocket.
For the reply TStringList another critical section is used to protect it.

I have now a simple test client where I can send packets manually via
button or 1000 in one go via a for loop. The test app. displays the
replies in a memo. If I send some requests manually, all is fine, but if
I send them in the loop (no sleep between the iterations) the whole
thing gets stuck somewhere. At least no answers get back and it seems
that these requests are added to the request TStringList (I can see the
count of it) but something prevents further processing. This is a real
block for me now.

Now I want to rule out that it has something todo with the TWSocket and
or rinbuffer implementation. Do critical sections work in the same
thread or only for different threads?

Greetings

Markus

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Interesting connect problem

2006-09-14 Thread Dan
Implement your own timeout using a timer.  I think calling abort on the
WSocket should cancel the connection attempt.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Erich Kuba
Sent: 14 September 2006 01:32
To: ICS support mailing
Subject: [twsocket] Interesting connect problem

Hi all,

I have recently noticed a couple of interesting entries in one of my system
logs from a Mail Relay Agent written using the TSMTPCli component, which
raises a few interesting questions.

Firstly here is a small extract from the system log

> 19:26:28 - Connecting to mta1.grp.scd.yahoo.com
> 19:26:47 - Disconnected from mail server - mta1.grp.scd.yahoo.com
> 19:26:47 - Connecting to mta2.grp.scd.yahoo.com
> 19:41:57 - Disconnected from mail server - mta2.grp.scd.yahoo.com
> 19:41:57 - Connecting to mta3.grp.scd.yahoo.com
> 19:57:06 - Disconnected from mail server - mta3.grp.scd.yahoo.com

The line that starts with "Connecting to" is written to the log as the
connect method is called.  The line that starts with "Disconnected from mail
server" is written when the OnSessionClosed event handler is fired.  So you
can see, particularly from the last two lines, it took 16min 9sec to fire
the event handler.

Now, this is NOT a TWSocket problem.  You can reproduce the problem from the
DOS command line with "telnet mta3.grp.scd.yahoo.com 25".  However, it is
important to find a solution to this problem as the relay engine is
effectively being held up by this strange behaviour.  What should be said is
that the fact that the relay engine is even going to mta3.grp.scd.yahoo.com
as a result of spam, so it's possible that the spammer has found this
interesting behaviour, and is exploiting it.

Any suggestions on how I can prevent this behaviour from holding up my
system in the future ??

Cheers

Erich


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] bytes lost with PUT FTP

2006-09-12 Thread Dan
Possibly a transfer mode error.  Make sure you are transferring in binary
mode.  Note: I think you need to set a property to make the client component
not modify end of lines AND send the binary command to the server.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Arnold FLUTEAUX
Sent: 12 September 2006 17:56
To: twsocket@elists.org
Subject: [twsocket] bytes lost with PUT FTP

Hi

 

I've a problem with FTP client component. I'm using with .NET. I want to put
a file with small size (equal to 12 kb for example). It's ok in LAN but
doesn't in RAS connexion. I lost bytes. With my sample file, I upload only
8760 BYTES on 11 kb. I'm using the component with putasync method. Have you
got an idea ?

And on server side, all seems happened good => storDataAvalable and
storsessionclosed OK. 

Thanks.

 

Arnold

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TCP question

2006-09-03 Thread Dan
The HTTP server in ICS will handle receiving the whole request before you
handle it.  You can ignore buffering if you are just using the http server
component.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Kris Leech
Sent: 03 September 2006 11:38
To: ICS support mailing
Subject: Re: [twsocket] TCP question

With the HTTP Server though you will get the whole HTTP request even if 
it has been split up in to multiple packets at the TCP level?

Markus Humm wrote:

>Hello,
>
>if a client on a LAN sends a packet with e.g. 512 Bytes and TCP splits
>it up internaly to e.g. 4x128 Bytes will the receiver get 4x the
>OnDataAvailable event, or 1x with the whole 512 Byte?
>
>So needs the sender to have a larger buffer to be able to concatenate
>such packets before he can check and process them? if yes, has anybody a
>ringbuffer implementation he would share? Otherwise I'm toying with the
>idea to use a string as buffer so I can add chars and delete some from
>the beginning of the buffer as needed, but I don't know whether memory
>fragmentation is a issue here (D2006 with FastMM).
>
>Greetings
>
>Markus
>  
>


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FTP resuming transfers

2006-09-01 Thread Dan
Its possible that a client can rollback some part of the file incase the end
(where the transfer was interrupted) is corrupt.  Some clients do a REST to
eg. 4kb less than the current size.  I think it makes more sense to set the
position and size when the transfer begins following a REST command.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Francois PIETTE
Sent: 31 August 2006 20:34
To: ICS support mailing
Subject: Re: [twsocket] FTP resuming transfers

>> Do you mean it could be smaller than his previous size
>> when resuming a transfert ?
>
> Yes, that's what I mean and the question :))

If a resumed transfer is smaller than the existing file, then there is a 
problem ! It is likely that the start of the local file is no more the same 
as the copy on the server and the whole transfert is corrupted.

--
[EMAIL PROTECTED]
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


- Original Message - 
From: "Arno Garrels" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, August 31, 2006 9:18 PM
Subject: Re: [twsocket] FTP resuming transfers


> Francois PIETTE wrote:
>>> I reworked the streams stuff in both FTP C/S today and
>>> fixed some bugs, everything was tested sucessfully with
>>> 64-bit streams. There's only one question I cannot answer
>>> by myself.
>>> TFileStream in mode fmOpenWrite does not set its size
>>> to current position when it is destroyed. Won't it make
>>> sense to set stream size explizitely to the current position
>>> in the FtpCli/FtpSrv when data connection is closed
>>> (although I guess that it won't work in D2 since method
>>> Size exists since D3)?
>>>
>>> What do you think?
>>
>> Do you mean it could be smaller than his previous size
>> when resuming a transfert ?
>
> Yes, that's what I mean and the question :))
>
>> I don't think so.
>>
>> --
>> Contribute to the SSL Effort. Visit
>> http://www.overbyte.be/eng/ssl.html --
>> [EMAIL PROTECTED]
>> http://www.overbyte.be
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Connect() time out

2006-08-02 Thread Dan
Maybe you could leave the current socket and use a new one for your next
attempt?  Then simply free the old one when it finishes the connect
(probably with a winsock connection timeout error).

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Max Terentiev
Sent: 02 August 2006 11:23
To: ICS support mailing
Subject: Re: [twsocket] Connect() time out

Hello, Francois,

I call SmtpCli->Connect(). If it's timed out - I call SmtpCli->Abort().

After it I start New smtp session and call SmtpCli->Connect() for next
email. I receive 10004 in SmtpRequestDone.

Please note: after TimeOut and SmtpCli->Abort() i receive 10004 error for
next 20-30 Connect attempts !


---
With best regards, Max Terentiev.
Business Software Products.
AMS Development Team.
[EMAIL PROTECTED]


- Original Message - 
From: "Francois Piette" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, August 02, 2006 1:27 PM
Subject: Re: [twsocket] Connect() time out


>> How to cancel SmtpCli->Connect() call if this connection attempt
>> is timed out ?
>> 
>> If SmtpCli->Connect() terminated by SmtpCli->Abort() - I notice MANY
>> 10004 errors during next connection attempts.
> 
> Abort is the way to go. It close the socket at winsock level.
> Which winsock call is producing error 10004 ?
> 
> 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: "Max Terentiev" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Wednesday, August 02, 2006 11:16 AM
> Subject: [twsocket] Connect() time out
> 
> 
>> Hello,
>> 
>> How to cancel SmtpCli->Connect() call if this connection attempt
>> is timed out ?
>> 
>> If SmtpCli->Connect() terminated by SmtpCli->Abort() - I notice MANY
>> 10004 errors during next connection attempts.
>> 
>> Maybe it's needed to call some Winsock API function directly on
>> SmtpCli->CtrlSocket ?
>> 
>> What is proper way to cancel Connect() by timeout ? 
>> 
>> ---
>> With best regards, Max Terentiev.
>> Business Software Products.
>> AMS Development Team.
>> [EMAIL PROTECTED]
>> 
>> -- 
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] UDP Socket Range Error

2006-08-02 Thread Dan
Somebody else requested that the debug messages be conditionally defined so
you can probably expect that soon.
As for the problem, I think you could just turn off range checking for your
project for the time being.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Johnnie Norsworthy
Sent: 02 August 2006 17:33
To: ICS support mailing
Subject: Re: [twsocket] UDP Socket Range Error

On 8/2/06, Francois PIETTE <[EMAIL PROTECTED]> wrote:
> > 008d7c34 +064 REMINDER.EXE OverbyteIcsWndControl  525  +1
> > TIcsWndControl.Dispose
>
> Can you point the exact source code ? It is likely that your line numbers
> doesn't match my line numbers. Show the offending line and a few before
and
> after so that we can locate exactly which istruction trigger the range
> error.
>
> In my source code, line 525 is:
>OutputDebugString(PChar('Dispose ' + ClassName + ' ThreadID=' +
> IntToStr(GetCurrentThreadId)));
>
> It is possible that GetCurrentThreadId return an unsigned integer which
> could not fit into an integer required for IntToStr (an integer in the
range
> 2G to 4G). You may simply remove that line since it is for debugging
> purpose, or fix it like this:

Thanks for responding..

This is the same line I have. The problem is that same code is all
over the place in the source. Is there another version of the source
without those debug statements or with conditional compilation
directives?

I need the code for the UDP packet sending as bullet-proof as
possible. Would you recommend programming it in something less
powerful than ICS - possibly the standard Delphi sockets? I can't use
Indy as it also cause some obscure error and I don't care to
inconvenience the Indy people anymore.  I am running the server here
on on eo fmy machines with ICS code with no problems.

The machine the error is happening on is a Windows 98SE machine and so
far, it is just that one computer.

-Johnnie
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Converting from Indy - UDP Send - DNS caching

2006-08-01 Thread Dan
There won't be any connection/disconnection problems because you are using
UDP.  Calling connect on a UDP socket just sets up a default recipient for
the packets you send, no actual connection occurs.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Johnnie Norsworthy
Sent: 01 August 2006 21:03
To: ICS support mailing
Subject: Re: [twsocket] Converting from Indy - UDP Send - DNS caching

On 8/1/06, Dan <[EMAIL PROTECTED]> wrote:
> Why not open the socket at the start, then just call WSocket.SendStr when
> you want to send something.
I thought by leaving it open it might cause disconnection problems.
Can I just leave it open all the time and call Send() as needed. It
may be hours before it sends. I can just open and close it in my
TDatamodule event code if that will work.

> Yes, you need to add #13#10 if your receiver needs it, calling SendStr
does
> not add this for you.
Thanks.
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Converting from Indy - UDP Send - DNS caching

2006-08-01 Thread Dan
Why not open the socket at the start, then just call WSocket.SendStr when
you want to send something.
Yes, you need to add #13#10 if your receiver needs it, calling SendStr does
not add this for you.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Johnnie Norsworthy
Sent: 01 August 2006 20:26
To: twsocket@elists.org
Subject: [twsocket] Converting from Indy - UDP Send - DNS caching

I am converting a small remote logging project from Indy to ICS that
sends UDP packets. Following the example in UDPSend1.pas, I do the
following when I wish to send my string:

  WSocket.Proto := 'udp';
  WSocket.Addr  := 'mydomain.com';
  WSocket.Port  := '12007';
  WSocket.Connect;
  WSocket.SendStr('mystring');

in the WSocket.DataSent() event:
  WSocket.Close;

What type of error conditions/exceptions might occur in the sending
code that I need to watch for? Is there ever a situation when .Connect
would fail due to an existing connection if sending a few packets in a
short span?

Do I need to add #13 #10 to strings before sending?

Can I cache the domain lookup after sending the first packet to speed
up the send process or is it helpful? If so, in what event do I grab
the looked up IP Address and from what property?

Thanks! I am looking forward to using ICS.

-Johnnie
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Very strange problem with server and client software[thanks]...

2006-07-31 Thread Dan
No, I think you were right...
If you call send, then do something, and the message pump doesn't get
called, then you should not receive anything until when the message pump
does get called.
For example, it should be fine for me to do:
  WSocket1.SendStr("HELO");
  State:=stWaitingForHeloResponse;
  Etc.

When I receive the reply to HELO that state should be set, because nothing
could call the message pump.
I think you have a bug somewhere if you are getting the response before.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Hoby Smith
Sent: 31 July 2006 15:37
To: twsocket@elists.org
Subject: Re: [twsocket] Very strange problem with server and client
software[thanks]...

Hello.

 

Just wanted to say thanks for the great input over the weekend!

 

I will consider the input.  Francois, you are right, that particular part of
the initial handshaking exchange probably is a flaw in the implementation,
although it is a requirement in the protocol design.  In the protocol
design, it is not possible to prepare the CHANNEL before sending the packet,
as modifying the channel parameters before the Client is ready will result
in a garbled reception by the Client.  The packet buffering to prepare the
packet before re-syncing the channel works fine.  That is the only place in
the protocol design where that is a weakness.  Every other packet exchange
is basically non-modal and can occur in any random or unpredictable order.  

 

I guess I assumed that because I was not RECEIVING multi-threaded, or
calling any message processing loops, or implementing any custom message
pumps, that I wouldn't experience a sequencing issue of that nature.
Obviously, I was wrong. :-)

 

Thanks again.

 

Hoby

 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] ICS v6 enhanced tcp server challenge

2006-07-23 Thread Dan
I haven't used it because I'm way too busy at the moment, but thanks for
making this publicly available, it sounds excellent.  And if I haven't said
it before, thanks to Francois for giving us ICS in the first place.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Arno Garrels
Sent: 23 July 2006 17:21
To: ICS support mailing
Subject: Re: [twsocket] ICS v6 enhanced tcp server challenge

Arno Garrels wrote:
> Hello,
> 
> I found some time to work on a new multi-threading TCP server
> component. It features multiple listen sockets implemented as
> TCollectionItems and dynamic connection pooling.
> Threads as well as client objects are dynamically managed.
> Tested as a simple echo server it appears to be very fast.
> Though it is still work in progress the inluded demo runs
> stable, tested with several million test connections.
> The demo also runs listen sockets in a worker thread, and
> lets you set CPU binding (affinity masks) of the various
> threads.
> 
> I appreciate if interested ICS users would help to improve,
> test or just play with it, anyway it is a nice toy ;-) Your
> comments are welcome.
> 
> The ZIP also includes a test client which is a quick and
> dirty modification of Wilfried's GPRS Client.
> 
> http://www.duodata.de/misc/delphi/MTServer_Bin.zip (~ 500 KB)
> http://www.duodata.de/misc/delphi/MTServer_Src.zip (~ 50 KB)
> 
> Requires latest ICS-V6, Delphi7 or Delphi10. Also the included,
> slightly modified OverbyteIcsWndControl.pas (Property ThreadID
> published, search for "{AG}") which Francois has not confirmed
> yet.

Updated the download. If you experience a memory leak compiling
the demo with D7 try FastMM4 it appears to fix it.

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with FTPClient when a shutdown

2006-07-11 Thread Dan
Maybe you have only detected the disconnection of the data socket and the
control socket will follow that? I'm not sure how disconnections with the
data socket are handled.  Maybe someone else knows?

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Arnold FLUTEAUX
Sent: 11 July 2006 08:50
To: twsocket@elists.org
Subject: Re: [twsocket] Problem with FTPClient when a shutdown

To launch a new connection is not a problem. But to launch it, I must know
if the winsock is deconnected or no. 
If winsock is always connected then I try again to launch the command which
has had a problem and if winsock is disconnected, I launch a new connection
in other procedure than requestdone.
My problem is why when I cut off the connection during a RETR command, the
connected property is set yet to true and the controlsocket.state property
is not set to wsclosed.
 
 
 
Create a custom message handler that starts a new connect.  Then post the
required message from RequestDone to initiate the new connection after
RequestDone has exited.  You shouldn't try to reconnect from RequestDone as
far as I know, and you definitely shouldn't call ProcessMessages (that will
lead to even more problems)
 
Dan

 

 

Arnold Fluteaux

Chargé d'Affaires

SCJ Informatique

 

02.35.59.22.55

06.15.77.70.14

 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with FTPClient when a shutdown

2006-07-11 Thread Dan
Create a custom message handler that starts a new connect.  Then post the
required message from RequestDone to initiate the new connection after
RequestDone has exited.  You shouldn't try to reconnect from RequestDone as
far as I know, and you definitely shouldn't call ProcessMessages (that will
lead to even more problems)

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Arnold FLUTEAUX
Sent: 11 July 2006 08:35
To: twsocket@elists.org
Subject: Re: [twsocket] Problem with FTPClient when a shutdown

I cut off the server, then an error product in RequesDone with ErrCode > 0.
It’s OK. So I’ve made a procedure to analyze the error and I test the
“connected” property and the controlsocket.state property and it says that
the winsock is already connected. In debug mode, it says the same except if
I’m waiting a few seconds. So when I’m seen that, I’ve tried to put some
processmessage but it’s not always OK.
Must I test others property ? or directly ErrCode ? 
 
 
Arnold FLUTEAUX wrote:
 
> First of all, Sorry for my english !
 
It's OK, many subcribers of this list are not perfectly speaking english.
 
> testing the ftpclient and when I cut off the server connection, the
> requestdone event has ErrCode >0. It's OK. But .connected property
> equal to 
> True and .controlsocket.state equal to TSocketState.wsClosed as I
> have cut 
> of the connection.
 
That sounds strange. Because in component's procedure 
ControlSocketSessionClosed FConnected is set to FALSE (in the first place),
are you really sure that Connected is TRUE  while CtrlSocket.State is
wsClosed?
 
Arno Garrels

 

 

Arnold Fluteaux

Chargé d'Affaires

SCJ Informatique

 

02.35.59.22.55

06.15.77.70.14

 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] UDP Concept doubt

2006-07-03 Thread Dan
UDP packets can be fragmented at the IP level, but once you do a receive you
will receive the full datagram so you don't have to worry about it.  A
problem you may run into though is that of WSockets default buffer not being
big enough for a full size UDP packet... you might have to set the buffer
higher than the default if you aren’t receiving the full datagrams.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Éric Fleming Bonilha
Sent: 03 July 2006 13:42
To: twsocket@elists.org
Subject: [twsocket] UDP Concept doubt

Hello Everyone!

I´m in doubt in some aspects of UDP.

Do UDP suffers from fragmentation like TCP? what I mean is that in TCP if I
send a chunck of data, it is not guaranteed that this data will be received
in a single event correct? It is guaranteed that it will be delivered
completed and in order, so we have to implement packet boundaries on the
application protocol.

I would like to know if I send packets of data in UDP it will be fragmented
too, because if it is, than an application protocol that will use UDP as
underling layer will have to implement some packet boundaries mechanism.

I´m asking this because of the RTP (Real Time Protocol) protocol, I´m
currently developing an application that will have to parse RTP packets, but
on RTP specification there is no packet boundaries. On the specification is
only said that one RTP packet should be sent on one UDP packet, but I´m
thinking if UDP packet will be fragmented and will be received in one or
more events on ICS

Thanks a lot

Éric Fleming Bonilha
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] ZeroWindow

2006-06-27 Thread Dan
You can use OnDataSent to know when WSocket has sent all its data to Winsock
and you can send some more.  If TCP window goes to 0 as you put it, then
Winsock wont be able to send anymore so you wont get the OnDataSent until it
can.  So, say you have a file to send, send it in blocks of a few KB at a
time.  When you get OnDataSent send the next few KB.  This also avoids
filling WSockets buffers up too much and wasting memory.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of emanuele bizzarri
Sent: 27 June 2006 17:25
To: ICS support mailing
Subject: Re: [twsocket] ZeroWindow

Hi Francois,
yes, it refer to TCP flow control.
During TCP transmission, the receiver sends acknoledge packets  to the  
transmitter specifying the Usable Window Size as amount of data he can 
accept.
If Usable Window Size goes to 0 the transmission stops.
In my application, this condition is verified when the receiver is not 
able to process data immediately.
Usable Windows Size is progressively reduced until 0.
I'd like to stop transmission when this event occours.
How can I do to limit transission bitrate if speed is to high?
Thanks,
Emanuele Bizzarri


Francois PIETTE ha scritto:
>> Is it possible to detect TCP ZeroWindow by twsocket in order to stop
>> transmission?
>> 
>
> I don't know what "TCP zero window" is, but I'm almost sure you can't do 
> anything with it using ICS.
> Note that if this refer to TCP flow control, you have nothing to doto stop

> transmission, it is automatically done by winsock.
>
> --
> [EMAIL PROTECTED]
> http://www.overbyte.be
>
>   


-

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] WSocket - HOW DO I...?

2006-06-25 Thread Dan
You can then use WSockets linemode.  Set the end of line character to #04.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Waldemar Lukaszewski
Sent: 25 June 2006 09:21
To: ICS support mailing
Subject: Re: [twsocket] WSocket - HOW DO I...?

Ok... finally got an answer from rcon script creator... Now I understand
what does this "An optional 0x02 character can be prefixed ..." text mean :)
I can put #2 before command so the command would be terminated with EOT
(#4)... thanks everybody for help!

Without this #2 prefix rcon is kinda usless... because in some commands last
char is just last char of data - like "0" in bf2cc pl command, where 0 means
that last player in the list forgave teamkill 0 times.

Dnia 24-06-2006 o godz. 17:51 Dan napisał(a):
> http://bf2.fun-o-matic.org/index.php/RCon_Protocol
> 
> "Commands 
> All commands sent by the client have /n (0x0A) appended to indicate the
> end-of-line. An optional 0x02 character can be prefixed to the command -
> this instructs the server to append a 0x04 character on the output 
> generated
> by the command to indicate the end of the data. However, its worth noting
> that the server does not send a 0x0A (newline) after the 0x04 (EOT)
> character, so you'll have to make sure your program can handle this. 
> This is
> an optional part of the protocol that can be implemented if returning 
> all of
> the output is important to your environment. "
> 
> Dan
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Waldemar Lukaszewski
> Sent: 24 June 2006 16:04
> To: ICS support mailing
> Subject: Re: [twsocket] WSocket - HOW DO I...?
> 
> It's a standard header. No additional data available... Compare the 2 
> dumps
> I gave... packet size header is the number of bytes in selected packet...
> doesnt have anything to do with how WSocket will "split" it...
> 
> 
> Dnia 24-06-2006 o godz. 15:18 Arno Garrels napisał(a):
> > Waldemar Lukaszewski wrote:
> > > Its TCP for sure... but the problem is that there are not terminators
> > > (terminating strings/chars)... 
> > 
> > The dump looks like a header is prepended that probably contain data
> > length.  You need to know the header structure/size and the protocol as
> > well otherwise it will be hard to get tis working.
> > 
> > ---
> > Arno Garrels [TeamICS]
> > http://www.overbyte.be/eng/overbyte/teamics.html
> >  
> > 
> > > 
> > > Look at this... full dump from IRIS:
> > > 
> > > http://komputery.info.pl/PACKETS/fulldump_lan_ok.txt - packets are
> > > being sent in one... whole "BF2CC PL" command answer was sent at
> > > once... - no problem here.  
> > > 
> > > http://komputery.info.pl/PACKETS/fulldump_lan_notok.txt - packets are
> > > split, answer to request was sent in few parts, OnDataAvailable was
> > > called 4 times!  
> > > 
> > > So how do i know if full single command answer was sent or is it only
> > > a part of it??? :( 
> > > 
> > > Dnia 23-06-2006 o godz. 8:46 Francois Piette napisal(a):
> > >> If you have a protocol designed for UDP and use it with UDP, then 
> you
> > >> have a
> > >> problem: UDP preserve datagram boundaries. TCP doesn't because it is
> > >> a stream oriented protocol. So when in the UDP version you simply
> > >> send "bf2cc
> > >> pl" (exactly, without anything prepened or appended), then with TCP
> > >> you _must_ add an "end of line" delimiter such as a CR/LF pair so
> > >> that the receiver know when data has been received.
> > >> 
> > >> Again, read "TCP/UDP primer" document available from the support
> > >> page at my
> > >> website.
> > >> 
> > >> 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: "Waldemar Lukaszewski" <[EMAIL PROTECTED]>
> > >> To: "ICS support mailing" 
> > >> Sent: Thursday, June 22, 2006 10:00 PM
> > >> Subject: Re: [twsocket] WSocket - HOW DO I...?
> > >> 
> > >> 
> > >>> In BF2 it uses TCP... anyways... the p

Re: [twsocket] WSocket - HOW DO I...?

2006-06-24 Thread Dan
http://bf2.fun-o-matic.org/index.php/RCon_Protocol

"Commands 
All commands sent by the client have /n (0x0A) appended to indicate the
end-of-line. An optional 0x02 character can be prefixed to the command -
this instructs the server to append a 0x04 character on the output generated
by the command to indicate the end of the data. However, its worth noting
that the server does not send a 0x0A (newline) after the 0x04 (EOT)
character, so you'll have to make sure your program can handle this. This is
an optional part of the protocol that can be implemented if returning all of
the output is important to your environment. "

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Waldemar Lukaszewski
Sent: 24 June 2006 16:04
To: ICS support mailing
Subject: Re: [twsocket] WSocket - HOW DO I...?

It's a standard header. No additional data available... Compare the 2 dumps
I gave... packet size header is the number of bytes in selected packet...
doesnt have anything to do with how WSocket will "split" it...


Dnia 24-06-2006 o godz. 15:18 Arno Garrels napisał(a):
> Waldemar Lukaszewski wrote:
> > Its TCP for sure... but the problem is that there are not terminators
> > (terminating strings/chars)... 
> 
> The dump looks like a header is prepended that probably contain data
> length.  You need to know the header structure/size and the protocol as
> well otherwise it will be hard to get tis working.
> 
> ---
> Arno Garrels [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
>  
> 
> > 
> > Look at this... full dump from IRIS:
> > 
> > http://komputery.info.pl/PACKETS/fulldump_lan_ok.txt - packets are
> > being sent in one... whole "BF2CC PL" command answer was sent at
> > once... - no problem here.  
> > 
> > http://komputery.info.pl/PACKETS/fulldump_lan_notok.txt - packets are
> > split, answer to request was sent in few parts, OnDataAvailable was
> > called 4 times!  
> > 
> > So how do i know if full single command answer was sent or is it only
> > a part of it??? :( 
> > 
> > Dnia 23-06-2006 o godz. 8:46 Francois Piette napisal(a):
> >> If you have a protocol designed for UDP and use it with UDP, then you
> >> have a
> >> problem: UDP preserve datagram boundaries. TCP doesn't because it is
> >> a stream oriented protocol. So when in the UDP version you simply
> >> send "bf2cc
> >> pl" (exactly, without anything prepened or appended), then with TCP
> >> you _must_ add an "end of line" delimiter such as a CR/LF pair so
> >> that the receiver know when data has been received.
> >> 
> >> Again, read "TCP/UDP primer" document available from the support
> >> page at my
> >> website.
> >> 
> >> 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: "Waldemar Lukaszewski" <[EMAIL PROTECTED]>
> >> To: "ICS support mailing" 
> >> Sent: Thursday, June 22, 2006 10:00 PM
> >> Subject: Re: [twsocket] WSocket - HOW DO I...?
> >> 
> >> 
> >>> In BF2 it uses TCP... anyways... the problem is that i dunno how to
> >>> set this buffer size :( The problem appears only on WIFI
> >>> connection... :(  
> >>> 
> >>> 
> >>> Dnia 22-06-2006 o godz. 21:23 Dan napisal(a):
> >>>> RCON usually uses UDP (at least in my experience with Half-Life).
> >>>> You probably need to increase the buffer size of the socket so
> >>>> that all the data
> >>>> is included in a single datagram.
> >>>> 
> >>>> Dan
> >>>> 
> >>>> -Original Message-
> >>>> From: [EMAIL PROTECTED]
> >> [mailto:[EMAIL PROTECTED]
> >> On
> >>>> Behalf Of Waldemar Lukaszewski
> >>>> Sent: 22 June 2006 19:34
> >>>> To: ICS support mailing
> >>>> Subject: Re: [twsocket] WSocket - HOW DO I...?
> >>>> 
> >>>> The problem is that i'm only making a clinet. Server is as it is.
> >>>> There is
> >>>> no way to change it...
> >>>> 
> >>>> 
> >>>> Dnia 22-06-2006 o godz. 17:58 Francois PIETTE napisal(a):

Re: [twsocket] WSocket - HOW DO I...?

2006-06-22 Thread Dan
RCON usually uses UDP (at least in my experience with Half-Life).  You
probably need to increase the buffer size of the socket so that all the data
is included in a single datagram.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Waldemar Lukaszewski
Sent: 22 June 2006 19:34
To: ICS support mailing
Subject: Re: [twsocket] WSocket - HOW DO I...?

The problem is that i'm only making a clinet. Server is as it is. There is
no way to change it...


Dnia 22-06-2006 o godz. 17:58 Francois PIETTE napisał(a):
> > have no idea how do i know if server have sent all it wanted to send 
> after 
> > command.
> 
> The easiest is to add a delimiter after the data. And the eaisiest is to 
> use 
> a CR/LF pair, that is send text lines. It is easy because TWSocket has a 
> LineMode you can set to TRUE to have it assemble complete lines before 
> triggering OnDataAvailable.
> 
> You should probably read the document "TCP/UDP primer" available from 
> the 
> support page at my website.
> 
> 
> --
> Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
> --
> [EMAIL PROTECTED]
> http://www.overbyte.be
> 
> 
> 
> - Original Message - 
> From: "Waldemar Łukaszewski" <[EMAIL PROTECTED]>
> To: "twsocket" 
> Sent: Thursday, June 22, 2006 5:48 PM
> Subject: [twsocket] WSocket - HOW DO I...?
> 
> 
> > Hi.
> > Got serious problem with WSocket... im trying to write a client for 
> rcon 
> > (BF2 game server administration system), but have no idea how do i 
> know if 
> > server have sent all it wanted to send after command.
> >
> > For example got command "bf2cc pl" that list players on the server and 
> > gives some information about them... its raw text... but on my laptop 
> it 
> > sends data 2 times: first parto of data and second part of data... and 
> how 
> > do i know if its all or will it send some more??
> >
> > Thanx for help!
> > WL
> >
> > 
> > Chciałbyś zagrać w POKERA ON-LINE ale nie chcesz nic płacić?
> > Zagraj z nami! Darmowy polski poker on-line na Wirtualnej Polsce:
> > 
> http://klik.wp.pl/?adr=www.gol.wp.pl%2Fgry.online-poker.draw.html&sid=799
> >
> >
> > -- 
> > To unsubscribe or change your settings for TWSocket mailing list
> > please goto http://www.elists.org/mailman/listinfo/twsocket
> > Visit our website at http://www.overbyte.be 
> 
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 


Chciałbyś zagrać w POKERA ON-LINE ale nie chcesz nic płacić?
Zagraj z nami! Darmowy polski poker on-line na Wirtualnej Polsce:
http://klik.wp.pl/?adr=www.gol.wp.pl%2Fgry.online-poker.draw.html&sid=799


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] HTTPCli and non-default network interface?

2006-06-01 Thread Dan
I think you can set LocalAddr the the IP of the interface you want to use.

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Waldemar Lukaszewski
Sent: 01 June 2006 21:14
To: twsocket@elists.org
Subject: [twsocket] HTTPCli and non-default network interface?

Hi
Is there any way to force HTTPCli to use selected network 
interface / ip when i got 2 internet connections?
Thanx!
WL


NATE JAMES i płyta SET THE TONE. Album wschodzacej 
gwiazdy brytyjskiego R&B soul. 15 sierpnia wielki koncert!
NATE JAMES i SIMPLE RED w Warszawie. Towar, 19.00
http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fnatejames.html&;
sid=780


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] [ICS-SSL] Looking for a consultant to make ICSv6support BCB2006

2006-05-29 Thread Dan
It's generally a bad idea to use the using directive in header files.  You
should use the full name of any identifiers. Eg. Overbyteicslibrary::WM_QUIT

Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Fastream Technologies
Sent: 29 May 2006 12:44
To: ICS support mailing; SSL implementation for ICS
Subject: Re: [twsocket] [ICS-SSL] Looking for a consultant to make
ICSv6support BCB2006

One other solution would be to remove the "using namespace 
overbyteicslibrary" directive in the hpp but I have never done such task. 
Any idea?

Greetings from Turkey,

SZ

- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" ; "SSL implementation for 
ICS" <[EMAIL PROTECTED]>
Sent: Monday, May 29, 2006 1:34 PM
Subject: [ICS-SSL] Looking for a consultant to make ICSv6 support BCB2006


: Hello,
:
: Fastream needs help on making ICSv6 to support BCB2006. Current problem is
: that Francois decided to redefine identifiers like,
:
: WM_QUIT
:
: in the unit OverbyteIcsLibrary.pas. This is no problem for pascal but the
: auto produced hpp includes using namespace... making everything global and
: therefore the Windows definition and the ICS definition clashes. Francois
: suggested two solutions for this,
:
: 1) Use HPPEMIT
: 2) Use IFNDEF
:
: However in our efforts, both have failed. If you are good at Delphi/C++, 
and
: can work on this this week, please email us privately with your bid.
:
: (Note: the problem occurs when a project including the components are
: compiled, not when the package is compiled.)
:
: Best Regards,
:
: SubZ
:
: ___
: ICS-SSL mailing list
: [EMAIL PROTECTED]
: http://www.elists.org/mailman/listinfo/ics-ssl 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] BCB support for ICSv6(-SSL)

2006-05-13 Thread Dan
I've installed BDS2006 and I will have a go aswell.

Dan

- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "SSL implementation for ICS" <[EMAIL PROTECTED]>; 
Sent: Thursday, May 11, 2006 3:19 PM
Subject: [twsocket] BCB support for ICSv6(-SSL)


> Hello,
>
> As you know, Overbyte is fast abandoning the one-window-per-socket design
> implemented in v5 of ICS/ICS-SSL due especially to the inefficiency it
> created is servers. In our tests, with more than a few hundred users
> connected concurrently, ICS v5 simply struggles with performance falling
> from 900 requests per second on web server down to 150. In the age of
> thousands if not tens of thousands of users, this is not feasible.
>
> For the past one and a half month, we (Fastream) are trying to get the v6
> code working under bcb6-2006, yet unsuccessfully. Francois at the 
> beginning
> said this would require 1000Euros of money for the dedication and then 
> said
> he would do it anyway. I think we (BCB users) should unite and help 
> Overbyte
> fix the design problems in the v6 code. Starting from today, I myself will
> dedicate two hours of my work hours to the task each day. Fastream also
> hired Peter Nikolow from Bulgaria as consultant (he is also reading) for
> helping Francois. I would like to know what other BCB ICS users are 
> thinking
> and willing to do about this matter. As a lead coder of a FTPS/HTTPS 
> server
> and HTTPS reverse proxy with ICS, I can confidently propose that this work
> is vital for the future of ICS under BCB.
>
> Best Regards,
>
> Sub-Zero (G. I. Ates)
> CSA, www.fastream.com
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] BCB support for ICSv6(-SSL)

2006-05-13 Thread Dan
- Original Message - 
From: "Francois PIETTE" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, May 11, 2006 7:42 PM
Subject: Re: [twsocket] BCB support for ICSv6(-SSL)


>> If someone can help - I wish to have some CVS or SVN to syncronizing our
>
> You can simply put your updated sources on some HTTP or FTP space 
> (Fastream
> can probably provide you a FTP account) so that interested people can
> download it.
> It's easy to use WinMerge (OpenSource, search with Google) to track the
> changes.
> CVS would be useful if more than a handful people would work on the
> source...
>

CVS would be great, even if only one person works on the source...because it 
means you can always go back to previous versions.  It makes life easier 
because you dont have to mess around with multiple zips of different 
versions etc.

Dan 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FTP Error 10060 and 10061..

2006-04-27 Thread Dan
Sounds like the new router has a firewall built in and it rejecting/dropping 
packets.  Its worth a check.

Dan

- Original Message - 
From: <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, April 26, 2006 9:31 PM
Subject: [twsocket] FTP Error 10060 and 10061..


>
> We have been using the FTPClient to poll data from about 180 stores 
> nightly for several years.  We had a router go bad.  We replaced the 
> router and now the stores are trying to all upload their files.  After 
> executing a STOR command we receive error 10060 or 10061 "Data session 
> failed to open.".  Can anyone give me some guidance on this error and 
> where I can go from here.  I do not know if it is a timeout issue with all 
> the stores polling at once or a configuration issue with the new router.
>
> Here is a log of the events.  Note 23 seoncds have passed form the opening 
> connection message to the 10060 message.
>
> STOR CHECK0423200600043427.FTP.",0,0,0
> "4/27/2006 10:53:32" 150 Opening data connection for 
> CHECK0423200600043427.FTP.0098.TMP..",0,0,0
> "4/27/2006 10:53:55"Data session failed to open. Error #10060.",0,0,0
>
>
> Thanks in advance,
>
>
> James
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] ICS 6 Bug - Memory Leak

2006-04-25 Thread Dan
I think the destructor of TIcsWndHandler should be responsible for freeing 
it.  Its labelled FOwnerList, and the F usually means its private, so other 
classes shouldnt have to manually free it.

Dan

- Original Message - 
From: "Éric Fleming Bonilha" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, April 25, 2006 9:06 PM
Subject: [twsocket] ICS 6 Bug - Memory Leak


I´m using FastMM4, by declaring FastMM4 as first unit of my project, and 
when I close my application it says that there is 1 memory leak on module 
TIcsWndHandlerList.

This bug occurs even on the demo applications provided on ICS package

I have read the code of unit OverbyteIcsWndControl and I found a possible 
bug on the procedure TIcsWndHandlerPool.FreeWndHandler

procedure TIcsWndHandlerPool.FreeWndHandler(var WndHandler: TIcsWndHandler);
var
Index : Integer;
begin
if not Assigned(WndHandler.FOwnerList) then
Exit;
Index := WndHandler.FOwnerList.IndexOf(WndHandler);
if Index >= 0 then begin
WndHandler.FOwnerList.Delete(Index);
if WndHandler.FOwnerList.Count <= 0 then begin
Index := FList.IndexOf(WndHandler.FOwnerList);
if Index >= 0 then
FList.Delete(Index);
end;
WndHandler.Free;
WndHandler := nil;
end;
end;

The problem is that this routine is not freeing the WndHandle.FOwnerList

I added the code:

WndHandle.FOwnerList.Free;
WndHandler.Free;
WndHandler := nil;
end;
end;

just for test, and it worked fine, the memory leak message didn´t appears 
anymore, but I don´t know the impact of this code on the rest of the package 
because I don´t know the internal funcionality of ICS.

The FOwnerList shouldn´t be freed when the WndHandle class is destroyed

Éric
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] THttpCli and UPnP devices

2006-04-04 Thread Dan
- Original Message - 
From: "Kris Schoofs" <[EMAIL PROTECTED]>
To: "'ICS support mailing'" 
Sent: Tuesday, April 04, 2006 6:20 PM
Subject: Re: [twsocket] THttpCli and UPnP devices


> Hi Wilfried,
>
>> WSocket->>MultiCast=true;
>> Why is this nececary ?
> Well, discovery of UPnP devices require that you multicast an UDP packet 
> to
> 239.255.255.250:1900. All devices will then unicast a packet back to the
> sender. And since my discovery request needed to multicast I assume that I
> also needed to set WSocket->>MultiCast=true;
>
> Based on the info in your other posting I now realize that a socket can 
> send
> and receive both and so I rewrote my code accordingly. Now, I open the
> socket for listening and then use SendTo to send the packet. This seems to
> work much better now (no more packet loss).
>
> However, I still have some questions
>
> (1) Previously, when I opened the socket with ->>Connect() I got myself a
> free port number assigned in WSocket->>Port. This way I didn't have to 
> worry
> about which port I could use since I always got a free one assigned.
> However, now I open the socket with Listen(); and this requires me to 
> define
> WSocket->>Port before calling the Listen(). This makes sense because 
> usually
> you know where you want to listen. However, in my case I'm listening for
> responses that are sent back to the port I've used for sending the 
> discovery
> request. So, any port will be fine. For now, I've just put in a fixed port
> number to test my code, but I cannot always be sure if that port is
> available. So, I was wondering if it is possible to request WinSock for an
> available port that I can use (just like you get a port when using
> Connect()) ?

As an alternative to what Angus suggested, you could continue to listen but 
specify port 0.  The OS will then assign an unused port.  There is a winsock 
call you can use on the socket handle to get the port allocated but I don't 
remember it off the top of my head, and you wouldnt really need to know the 
port anyway.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] THttpCli and UPnP devices

2006-04-02 Thread Dan
Dont use connect, just use listen, but use SendTo to send the packet.  This 
lets you specify the address.

Dan

- Original Message - 
From: "Kris Schoofs" <[EMAIL PROTECTED]>
To: "'ICS support mailing'" 
Sent: Sunday, April 02, 2006 10:46 AM
Subject: Re: [twsocket] THttpCli and UPnP devices


> Thanks Angus. Suggesting to use UDP made it suddenly a lot more
> comprehensible...
>
> I've played around with it and I've noticed that all UPnP devices on the
> network repond with an unicast message sent to my IP on the same port that 
> I
> previously had used to multicast the UDP containing the discovery request.
>
> ** My outgoing UDP Packet :
> Internet Protocol, Src: 10.0.0.39 (10.0.0.39), Dst: 239.255.255.250
> (239.255.255.250)
> User Datagram Protocol, Src Port: 1059 (1059), Dst Port: 1900 (1900)
>
> ** An incoming UDP Packet in response to my discovery request :
> Internet Protocol, Src: 10.0.0.138 (10.0.0.138), Dst: 10.0.0.39 
> (10.0.0.39)
> User Datagram Protocol, Src Port: 1900 (1900), Dst Port: 1059 (1059)
>
> So, what I now do is multicast the UDP Packet, remember the port that was
> used for sending (WSocket->LocalPort), close the socket. And immediately
> re-open it but this time for listening on that same port...
>
> // SEND
> WSocket->Proto="udp";
> WSocket->Port=1900;
> WSocket->Addr ="239.255.255.250";
> WSocket->MultiCast=true;
> WSocket->Connect();
> String MyPort=WSocket->LocalPort;
> WSocket->SendStr(SSDP_Message);
> WSocket->Close();
> // LISTEN
> WSocket->Addr="0.0.0.0";
> WSocket->Port=MyPort;
> WSocket->MultiCast=false;
> WSocket->OnDataAvailable=WSocketDataAvailable;
> WSocket->Listen();
>
> This seems to work fine most of the time. However, every now and then the
> WSocket->OnDataAvailable does not get triggered. Any ideas what is causing
> this ? Is it OK to close the socket after sending and then immediately 
> open
> it again for listening on that same port ?
>
> Thanks.
>
> Kris
>
>
> //--
> -
> void __fastcall TMainForm::WSocketDataAvailable(TObject *Sender, WORD 
> Error)
> {
> charBuffer[1024];
> int Len;
> TSockAddrIn Src;
> int SrcLen;
>
> SrcLen = sizeof(Src);
> Len= WSocket->ReceiveFrom(Buffer, sizeof(Buffer), Src, SrcLen);
> if (Len >= 0) {
>Buffer[Len] = 0;
>DataAvailableLabel->Caption =
>IntToStr(atoi(DataAvailableLabel->Caption.c_str()) + 1) +
>": " + Buffer;
> }
> }
> //--
> -
>
>
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Angus Robertson - Magenta Systems Ltd
> Sent: vrijdag 31 maart 2006 1:54
> To: twsocket@elists.org
> Subject: Re: [twsocket] THttpCli and UPnP devices
>
>> I'm having a first look at discovering UPnP devices and I was
>> wondering if THttpCli can be used for this purpose ?
>>
>> Communicating with UPnP devices uses HTTP over UDP (HTTPMU and HTTPU).
>> In order to discover devices you send(post) a HTTP request using the
>> multicast address 239.255.255.250 on port 1900. All devices should
>> then respond to this request.
>
> It's not really HTTP as such, it's just a UDP broadcast that should cause
> one UDP packet to be returned by each device, each packet containing HTTP
> formatted data.  Sounds like a one hour project.
>
> Forget THttpCli, it uses TCP/IP with connections, totally different to
> UDP.
>
> Angus
> --
> To unsubscribe or change your settings for TWSocket mailing list please 
> goto
> http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] THttpCli and UPnP devices

2006-03-30 Thread Dan
You will need to alter the HTTP component to use UDP.  I have used UPnP for 
port forwarding before but always used Windows XP NAT Traversal API rather 
than controlling devices manually.  Should be completely possible though.

Dan

- Original Message - 
From: <[EMAIL PROTECTED]>
To: 
Sent: Thursday, March 30, 2006 11:58 AM
Subject: [twsocket] THttpCli and UPnP devices


> Hi,
>
> I'm having a first look at discovering UPnP devices and I was wondering if
> THttpCli can be used for this purpose ?
>
> Communicating with UPnP devices uses HTTP over UDP (HTTPMU and HTTPU). In
> order to discover devices you send(post) a HTTP request using the
> multicast address 239.255.255.250 on port 1900. All devices should then
> respond to this request.
>
> Any ideas if THttpCli can be used for this ?
>
> Thanks,
>
> Kris
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Making a MT HTTP Server -- NEED HELP!

2006-03-23 Thread Dan
- Original Message - 
From: "Dan" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, March 23, 2006 11:47 AM
Subject: Re: [twsocket] Making a MT HTTP Server -- NEED HELP!


> Tried installing them in delphi but got errors with undeclared identifiers
> for all the authentication stuff.  I must be using an older version of ICS
> than you.
>
> Dan
>

Ok, after doing a {$DEFINE NO_AUTHENTICATION_SUPPORT} I got them to install.
I dropped them on a form and built and ran the project fine.  However, it 
hung, using 100% cpu when I terminated it, even though I hadnt added any 
code to use them.
Those linker errors are C++ builder errors btw, not Delphi errors.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Making a MT HTTP Server -- NEED HELP!

2006-03-23 Thread Dan
Tried installing them in delphi but got errors with undeclared identifiers 
for all the authentication stuff.  I must be using an older version of ICS 
than you.

Dan

- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, March 23, 2006 11:01 AM
Subject: Re: [twsocket] Making a MT HTTP Server -- NEED HELP!


> Hello,
>
> I am not much familier with Delphi linker and the below errors persist.
> PLEASE DO NOTICE THAT THE CODE LINK I GAVE IS PASCAL AND YOU TOO CAN HELP.
>
> I am not in a good mood today and wish someone cared...
>
> Regards,
>
> SZ
>
> - Original Message - 
> From: "Fastream Technologies" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Thursday, March 23, 2006 11:05 AM
> Subject: [twsocket] Making a MT HTTP Server -- problem
>
>
>> Hello,
>>
>> I have coded the following: http://www.fastream.com/ics/icsmthttp.zip
>>
>> and get the following errors:
>>
>> Build
>>  [Linker Error] Unresolved external '__fastcall
>> Httpmtsrv::THttpMTServer::TriggerCreateClient(Wsocketmts::TWSocketMTClient
>> *&)' referenced from C:\FASTREAM\CURRENT PROJECTS\NETFILE SERVER
>> ENGINE\COMMON UNITS\PROTEIN & NFSERVER\HTTPSERVERDERIVATIONUNIT.OBJ
>>  [Linker Error] Unresolved external '__fastcall
>> Httpmtsrv::THttpMTServer::TriggerGetDocument(System::TObject *,
>> Httpsrv::THttpGetFlag&)' referenced from C:\FASTREAM\CURRENT
>> PROJECTS\NETFILE SERVER ENGINE\COMMON UNITS\PROTEIN &
>> NFSERVER\HTTPSERVERDERIVATIONUNIT.OBJ
>>  [Linker Error] Unresolved external '__fastcall
>> Httpmtsrv::THttpMTServer::TriggerHeadDocument(System::TObject *,
>> Httpsrv::THttpGetFlag&)' referenced from C:\FASTREAM\CURRENT
>> PROJECTS\NETFILE SERVER ENGINE\COMMON UNITS\PROTEIN &
>> NFSERVER\HTTPSERVERDERIVATIONUNIT.OBJ
>>  [Linker Error] Unresolved external '__fastcall
>> Httpmtsrv::THttpMTServer::TriggerPostDocument(System::TObject *,
>> Httpsrv::THttpGetFlag&)' referenced from C:\FASTREAM\CURRENT
>> PROJECTS\NETFILE SERVER ENGINE\COMMON UNITS\PROTEIN &
>> NFSERVER\HTTPSERVERDERIVATIONUNIT.OBJ
>>  [Linker Error] Unresolved external '__fastcall
>> Httpmtsrv::THttpMTServer::TriggerFilterDirEntry(System::TObject *,
>> System::TObject *, Httpsrv::THttpDirEntry *)' referenced from
>> C:\FASTREAM\CURRENT PROJECTS\NETFILE SERVER ENGINE\COMMON UNITS\PROTEIN &
>> NFSERVER\HTTPSERVERDERIVATIONUNIT.OBJ
>>  [Linker Error] Unresolved external 'Httpmtsrv::THttpMTConnection::'
>> referenced from C:\FASTREAM\CURRENT PROJECTS\NETFILE SERVER
>> ENGINE\CGI-ISAPI\WEBCONNECTION.OBJ
>>  [Linker Error] Unresolved external '__fastcall
>> Httpmtsrv::THttpMTConnection::~THttpMTConnection()' referenced from
>> C:\FASTREAM\CURRENT PROJECTS\NETFILE SERVER
>> ENGINE\CGI-ISAPI\WEBCONNECTION.OBJ
>>  [Linker Error] Unresolved external '__fastcall
>> Httpmtsrv::THttpMTConnection::THttpMTConnection(Classes::TComponent *)'
>> referenced from C:\FASTREAM\CURRENT PROJECTS\NETFILE SERVER
>> ENGINE\CGI-ISAPI\WEBCONNECTION.OBJ
>>  [Linker Error] Unresolved external '__fastcall
>> Httpmtsrv::THttpMTConnection::WndProc(Messages::TMessage&)' referenced
>> from
>> C:\FASTREAM\CURRENT PROJECTS\NETFILE SERVER
>> ENGINE\CGI-ISAPI\WEBCONNECTION.OBJ
>>  [Linker Error] Unresolved external '__fastcall
>> Httpmtsrv::THttpMTConnection::AuthCheckAuthenticated()' referenced from
>> C:\FASTREAM\CURRENT PROJECTS\NETFILE SERVER
>> ENGINE\CGI-ISAPI\WEBCONNECTION.OBJ
>>  [Linker Error] Unresolved external '__fastcall
>> Httpmtsrv::THttpMTConnection::ConnectionDataAvailable(System::TObject *,
>> unsigned short)' referenced from C:\FASTREAM\CURRENT PROJECTS\NETFILE
>> SERVER
>> ENGINE\CGI-ISAPI\WEBCONNECTION.OBJ
>>  [Linker Error] Unresolved external '__fastcall
>> Httpmtsrv::THttpMTConnection::ConnectionDataSent(System::TObject *,
>> unsigned
>> short)' referenced from C:\FASTREAM\CURRENT PROJECTS\NETFILE SERVER
>> ENGINE\CGI-ISAPI\WEBCONNECTION.OBJ
>>  [Linker Error] Unresolved external '__fastcall
>> Httpmtsrv::THttpMTConnection::ParseRequest()' referenced from
>> C:\FASTREAM\CURRENT PROJECTS\NETFILE SERVER
>> ENGINE\CGI-ISAPI\WEBCONNECTION.OBJ
>>  [Linker Error] Unresolved external '__fastcall
>> Httpmtsrv::THttpMTConnection::ProcessRequest()' referenced from
>> C:\FASTREAM\CURRENT PROJECTS\NETFILE SERVER
>&g

Re: [twsocket] Odd Behaviour

2006-03-20 Thread Dan
One data transfer uses one port.  However, even file listings are counted as 
a data transfer.  You can reuse ports, but not always straight away because 
of the time wait state.  So lets say you do a file listing and it uses your 
one and only data port...then you cannot use that port again for a minute or 
so, you wont be able to transfer a file during that period.  For a single 
user, transferring large files, 10 ports should be enough, but if you start 
transferring many tiny files, or get many users, you may run into problems.

Dan

- Original Message - 
From: "Allan Fernandes" <[EMAIL PROTECTED]>
To: "ICS" 
Sent: Monday, March 20, 2006 12:00 PM
Subject: Re: [twsocket] Odd Behaviour


> Hi,
>
>>> You need a bigger data port range than that.  This
>>> will allow only one data transfer (can be a file
> listing) then you will have problems with ports
>>> being in time_wait state, so having no available
> ports.
>
>
> Please correct my interpretation if I am wrong.
>
> One Ftp transfer can make use of more than one data
> port for transfering 1 file ?
>
> If I have correctly understood that then, will a range
> of about 10 ports (which I am sure are unused) be ok
> to tranfer files of upto 4 GB ?
>
>
> Regards
> Allan
>
>
>
>
>
>
> ___
> Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with 
> voicemail http://uk.messenger.yahoo.com
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Odd Behaviour

2006-03-18 Thread Dan
- Original Message - 
From: "Allan Fernandes" <[EMAIL PROTECTED]>
To: "ICS" 
Sent: Friday, March 17, 2006 11:21 AM
Subject: Re: [twsocket] Odd Behaviour


>
>   FtpClient1.Port=5011
>   FtpClient1.DataPortRangeStart=5015
>   FtpClient1.DataPortRangeEnd=5015
>

You need a bigger data port range than that.  This will allow only one data 
transfer (can be a file listing) then you will have problems with ports 
being in time_wait state, so having no available ports.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problem with v6 BCB package

2006-02-27 Thread Dan
I didn't think #defines followed namespaces, thought they were always 
global.  Could be wrong...

Dan

- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Monday, February 27, 2006 2:19 PM
Subject: Re: [twsocket] Problem with v6 BCB package


> NO wait, you must have got the idea of how to make a namespace from 
> delphi:
> it is easy and done in all ICS code as it is automatic in Delphi! In 
> Delphi
> the unit name becomes the namespace name in C++! The problem is in the
> current situation you -somehow- make the namespace contents public and 
> that
> causes ambigouity with windows identifiers. We need to either:
>
> 1) make the namespace private and calls like OverbyteIcs::getwindowlong
>
> OR
>
> 2) find a way to remove the namespace from within C++ source code. For
> example:
>
> #include 
> #include 
> do NOT use namespace overbyteICS // not sure the syntax here!
> #include 
>
> Regards,
>
> SZ
>
> - Original Message - 
> From: "Francois Piette" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Monday, February 27, 2006 4:00 PM
> Subject: Re: [twsocket] Problem with v6 BCB package
>
>
>>I have no idea about how to define C++ name space with Delphi code.
>> --
>> [EMAIL PROTECTED]
>> http://www.overbyte.be
>>
>> - Original Message - 
>> From: "Fastream Technologies" <[EMAIL PROTECTED]>
>> To: "ICS support mailing" 
>> Sent: Monday, February 27, 2006 2:47 PM
>> Subject: Re: [twsocket] Problem with v6 BCB package
>>
>>
>>> No I don't think that would be easy as well... Why don't you use
>>> namespaces
>>> which are designed for this purpose? You should not include the pascal
>>> translation of,
>>>
>>> use namespace overbyte;
>>>
>>> instead call functions like Overbyte::getwindowLong();
>>>
>>> I understand that you wanted to simply the uses part of the package but
>>> this
>>> makes it further complicated in the projects.
>>>
>>> Regards,
>>>
>>> SZ
>>>
>>> - Original Message - 
>>> From: "Fastream Technologies" <[EMAIL PROTECTED]>
>>> To: "ICS support mailing" 
>>> Sent: Monday, February 27, 2006 3:43 PM
>>> Subject: Re: [twsocket] Problem with v6 BCB package
>>>
>>>
>>> > This won't be as easy as to say: There are 20+ units! What about
>>> > including
>>> > a
>>> > special .h for this purpose that undefs all overbyte defs??
>>> >
>>> > Regards,
>>> >
>>> > SZ
>>> >
>>> > - Original Message - 
>>> > From: "Francois Piette" <[EMAIL PROTECTED]>
>>> > To: "ICS support mailing" 
>>> > Sent: Monday, February 27, 2006 3:23 PM
>>> > Subject: Re: [twsocket] Problem with v6 BCB package
>>> >
>>> >
>>> >> #ifdef HWND
>>> >> #undef HWND
>>> >> #endif
>>> >>
>>> >> Put this code (and similar) before the ICS includes.
>>> >> Also try varying the include order between ICS and Windows.
>>> >>
>>> >> --
>>> >> [EMAIL PROTECTED]
>>> >> http://www.overbyte.be
>>> >>
>>> >> - Original Message - 
>>> >> From: "Fastream Technologies" <[EMAIL PROTECTED]>
>>> >> To: "ICS support mailing" 
>>> >> Sent: Monday, February 27, 2006 2:04 PM
>>> >> Subject: Re: [twsocket] Problem with v6 BCB package
>>> >>
>>> >>
>>> >>> Hello,
>>> >>>
>>> >>> - Original Message - 
>>> >>> From: "Francois Piette" <[EMAIL PROTECTED]>
>>> >>> To: "ICS support mailing" 
>>> >>> Sent: Monday, February 27, 2006 12:56 PM
>>> >>> Subject: Re: [twsocket] Problem with v6 BCB package
>>> >>>
>>> >>>
>>> >>> >> I have been able to skip the bug by removing zlibobjs.pas.
>>> >>> >
>>> >>> > :-)
>>> >>> >
>>> >>> >> Now there is a huge design problem:
>>> >>> >
>>> >>> > Problems are always huge with you.
&

Re: [twsocket] UDPServer receive and IP

2006-02-20 Thread Dan
- Original Message - 
From: "George" <[EMAIL PROTECTED]>
To: 
Sent: Monday, February 20, 2006 9:20 AM
Subject: [twsocket] UDPServer receive and IP


> Hello,
>
> I have a UDPServer component and on DataAvailable
>
>  SrcLen := SizeOf(Src);
>  Len:= UDPServer.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen);
>
> ShowMessage(inet_ntoa(Src.sin_addr)); // i know the IP address of the 
> remote pc
>

Note: Dont use showmessage in the event handler.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Sending directly, not via Send Buffer

2006-02-19 Thread Dan

- Original Message - 
From: "Francois PIETTE" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Sunday, February 19, 2006 3:57 PM
Subject: Re: [twsocket] Sending directly, not via Send Buffer


>> Ok, then I must manage the received buffer by myself?
>> cutting and joining so that it can be interpreted perfectly by the
>> receiver,
>> is that right?
>
> Yes and no :-)
> TWSocket has a "line mode" in which it assemble (or split) packets for 
> you.
> You specify a delimiter (default to #13#10 but can be anything), tunr line
> mode on and then you get OnDataAvailable triggered only when one complete
> line (well anything terminated by your delimiter) has been received. If a
> line is split in several packets, or a single packet contain several 
> lines,
> WSocket will always trigger exactly one OnDataAvailable per line received.

Is this completely true.  I'm sure in the past I've had a receive call 
return multiple lines, something like "This is one line'#13#10'this is the 
next'#13#10'".  And I had to split multiple lines, and process individually. 
I don't know if this is a bug that was once fixed, but I remember having to 
do it when I first started using TWSocket (years ago), and have done ever 
since.

Dan

>
> If you don't use line mode, then you must design your protocol the way you
> like. Basically, your receiver has to know what the sender is sending ! If
> not using a delimiter (line mode), then you either have to send fixed 
> length
> record, or send somewhere the length or the type of your record (probably 
> at
> the start of the record).
>
> Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
> --
> [EMAIL PROTECTED]
> http://www.overbyte.be
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Fast Pings ! -> C++ :-(

2006-02-12 Thread Dan
- Original Message - 
From: "Francois PIETTE" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Sunday, February 12, 2006 7:23 AM
Subject: Re: [twsocket] Fast Pings ! -> C++ :-(


>> I've seen in the usermade. But the code is in Delphi,
>
> There is not much differences between Delphi and CPP code !
> Do all those replaces:
>
> ===
> :==
> .->
>

begin{
end;  }

Seriously, if you cant understand pascal but you can understand C++ 
something is wrong.

:) 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Clarification on asynchronus and threads

2006-02-01 Thread Dan
- Original Message - 
From: "Markus Humm" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, February 01, 2006 6:41 PM
Subject: [twsocket] Clarification on asynchronus and threads


> Hello,
>
> given a program which uses several sockets for several connections
> simultaniously. The responses from these connections (assume a 100 BMit
> LAN and about 10 connections) occur assynchronically, all sockets have
> been created by the main program.
>
> What if one of these sockets has lengthy things to do in its receive
> handler? Does it block all others because all have been created in the
> same thread? or do these events still occur to the other sockets as
> well, enabling them to do also lengthy processing? (means do they really
> run in paralell independant from each others?)
>
> Greetings
>
> Markus

While you are in the receive handler, other events cant be triggered for 
other sockets because no message pump is running.  You should keep your 
event handlers speedy, or if if you cant, move the processing to another 
thread.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] THttpConnection throttling problem with timer

2006-01-29 Thread Dan
I seem to recall a similar thing happening for my throttledwsocket.  I think 
I fixed it by setting the option NoReceiveLoop (not sure of the name, but 
you know what I mean).  Maybe your problem is related, worth a try.

Dan

- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Sunday, January 29, 2006 12:37 PM
Subject: Re: [twsocket] THttpConnection throttling problem with timer


> Hello,
>
> Perhaps we should think at the algorithm level. Here it is for your eyes
> only: ;)
>
> I want to throttle bandwidth of my reverse proxy which uses 
> THttpConnection
> and inside it an associated THttpCli.
>
> Bandwidth and consumed bandwidth is per domain and protected by critical
> sections.
> There is a serverThread for the listener of THttpServer and there are the
> worker threads.
>
> This is the algorithm:
> In the worker thread:
> -once a data is sent or received, inc the countOfDataForLast100ms
> -every 100ms, a message is passed from the serverThread so that the value 
> of
> countofDataForLast100ms is added to consumedBW
>
> In the server thread:
> -if msecs % 800 == 0
> resetConsumedAmount();
> resume all paused connections();
> -else
> for each connection
>  if it's not paused
>   if the consumed bandwidth has exceeded the total bandwidth in a total
> period of 8 secs
>pause();
>
> Do you see a problem with this algorithm? I cannot but it does not work. 
> It
> has the following problems:
> - TryToSend in WSocket consumes 100% CPU
> - Bandwidth is not limited much (my test kBps is 100 but it downloads at
> 4.2MBps!
>
> Best Regards,
>
> SZ
>
> - Original Message - 
> From: "Francois PIETTE" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Sunday, January 29, 2006 2:02 PM
> Subject: Re: [twsocket] THttpConnection throttling problem with timer
>
>
>>>> Not really. Each time I see a TTimer triggered every 100 mSec (or any
>>>> very
>>>> short time period), I know this will cause CPU problem. And bandwidth
>>>> limitation defenitely doesn't require a so short period of time. What 
>>>> is
>>>> useful, regarding bandwidth limitation - is to have bandwidth limited 
>>>> on
>>>> a
>>>> reasonable time period (a few second IMO).
>>>
>>>
>>> Francois,
>>>
>>> I disagree with this ,
>>>
>>> When a user has a very high bandwidth (100 Mbs), sampling every second 
>>> is
>>> way too slow.
>>> I you use 1000 msec sampling period, the throttle does not work work at
>>> all.
>>> Most likely, all data has been sent before the the throttle becomes
>>> active.
>>
>> Indeed. But nothing will be sent before the pause period has elapsed. The
>> net effect is the actual bandwidth being limited to the programmed level.
>> Of
>> course the instantaneous speed is _always_ the line speed. You can't slow
>> down a packet, it is always sent at wire speed. But you can slow down the
>> mean bandwidth computed on a given time interval. I pretend this time
>> interval should be at least a few seconds. Making this time interval
>> shorter
>> would impose a high CPU load without significant advantage.
>>
>> If you don't use persistant connection, then you should probably also
>> delay
>> the new connection while still in pause period (I'm not sure about the
>> pause
>> effect when connection is closed. I think it is simply ignored).
>>
>> --
>> [EMAIL PROTECTED]
>> http://www.overbyte.be
>>
>> -- 
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Absnormal disconnection

2006-01-24 Thread Dan
- Original Message - 
From: "George" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, January 24, 2006 7:42 PM
Subject: [twsocket] Absnormal disconnection


> Hello,
>
> I have a client/server application. Clients connect to Server. If client 
> reboot the machine by pressing the case reboot button or plug out the UTP 
> cable, Server will not be immediatelly informed for that disconnection.
> I know this is Windows TCP/IP limitation, so I want to ask if there is any 
> other way to know that an absonormal disconnection occured. Maybe by ICMP 
> pinging the host every 10 seconds? Can you give me some advices please?
>
> Thanks
> -- 
> 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
>

Send some data on the connection every now and again.  Like a ping, but in 
your protocol.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Port Access

2006-01-24 Thread Dan
Dont you connect to port 60500 instead of listening on it?  Something is 
already listening on that port.

Dan.

- Original Message - 
From: "David Lewis" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Tuesday, January 24, 2006 10:16 AM
Subject: [twsocket] Port Access


> Hi,
>
> I have a client service that connects and gathers data and then throws
> this data out in a stream on port 60500. This client is 3rd party and I
> cannot alter it. However, it is known to be working product.
>
> What I need to be able to do is connect to that stream stream of data on
> port 60500, and then decode and process it.
>
> I've tried just throwing together a quick test program, using a single
> TWSocket, with settings:
>co_IcsSocket->Addr = "0.0.0.0";
>co_IcsSocket->Port = "60500";
>co_IcsSocket->Listen( );
>
> But that throws:
>
> Project PortMonitor.exe raised exception class eSocketException with
> message 'Error 10048 in function Bind Address already in use'
>
> Now, I am presuming that the 'already in use' bit, means that the client
> service already has access to this port.
>
> What should I be doing differently to be able to gather this stream of
> data?
>
> Dave
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] HTTP POST - SendStream With TMemoryStream

2006-01-19 Thread Dan
Derive your own stream, probably best to be from TFilestream, but add a 
header property or something.  Then override the seek and read methods (I 
think) to either seek into the file or into your header, and to read 
appropriate data.


Dan

- Original Message - 
From: "Opqrst Ghrst" <[EMAIL PROTECTED]>

To: "ICS support mailing" 
Sent: Thursday, January 19, 2006 7:16 PM
Subject: 回覆: Re: [twsocket] HTTP POST - SendStream With TMemoryStream


thanks F.P.

I See,
but if the file is more than 1 GB, That will cost my
too mush disk free space,I am confuse on this problem,
because I must add Form Field Value information on the
Head of the data and boundary end of data.it will be
work by ContentTypePost="multipart/form-data" mothod
post.

--- Francois PIETTE <[EMAIL PROTECTED]> 說:


> when I use Http Post Web to send file,
> if the file is bigger as 100mb.
> because content must has some FormField to post,
> I use MemorrStream write these information and
> FileStream.
> when I load to TMemoryStream it will cause my
computer
> slow to build MemoryStream, can I use other
mothods to
> resolve this problem?

If you use TMemoryStream, then your 100MB of data is
loaded onto RAM which
can be slow. Use another kind of TStream, for
example a TFileStream which
store his data in a disk file instead of RAM.

--
Contribute to the SSL Effort. Visit
http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be


> -- 
To unsubscribe or change your settings for TWSocket

mailing list
please goto
http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



___
YM - 離線訊息
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。 
http://messenger.yahoo.com.hk>
 --> To unsubscribe or change your settings for TWSocket mailing list> please goto 
http://www.elists.org/mailman/listinfo/twsocket> Visit our website at 
http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] databuffer is cut off

2006-01-18 Thread Dan
- Original Message - 
From: "albert drent" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, January 18, 2006 8:57 PM
Subject: [twsocket] databuffer is cut off


>I have a problem sending large block of data. It's a binary string of 32696 
>bytes. It seems that only 3 bytes are send/received, rest is cut off. 
>Is there a need of sending smaller chunks and use ondatasent or is there 
>somewhere a hidden parm I need to adjust? I'm not even sure if the 
>TCPServer component or the TCPCLient component is the cause. LineLength = 
>0.
>
> albert
> -- 
> 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

Neither of those are ICS components.  This probably isn't the best list for 
your question.  You could of course try ICS.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Bandwidth control TFtpClient

2006-01-18 Thread Dan
I think theres already one in my zip, but Im not 100% sure.

Dan

- Original Message - 
From: "Peter Feldbaumer" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, January 18, 2006 3:30 PM
Subject: Re: [twsocket] Bandwidth control TFtpClient


>  Original Message 
> From: "Arno Garrels" <[EMAIL PROTECTED]>
>
>> I've just more or less copied and pasted the bandwidth control stuff
>> from HttpProt.pas to FtpProt.pas, enabled it on the data channel only
>> so far. I couldn't find a note who contributed this code?
>> Also, should I enable it on the control channel as well??
>
> Could I suggest to create a descendent component from TFtpSrv - something
> like TFtpSrvThrottled - to implement bandwidth-limiting?
>
> The current implementation (if it is like in HttpProt.pas) doesn't fit my
> needs (and probably that of others, too) - e.g. if one needs to implement
> overall or single-connection throttling.
>
> If all is packed into the "base" component then there is no way around
> duplicate code in the compiled exe - however if it is in a derived 
> component
> then one can simply select to choose TFtpSrvThrottled or TFtpSrv.
>
> Moreover I think it would definitely help to improve code-"readability" if
> not everything is packed into the base component.
>
> For FTPSrv I could offer an implementation based on Dan's ThrottledWSocket
> (see http://www.xantorrent.pwp.blueyonder.co.uk/ics/ThrottledWSocket.zip)
> which doesn't touch anything in the base FtpSrv.pas - and therefore is
> completely based on inheritance (I really like it that way and could leave
> the throttling-code untouched since 2003, although I updated ics more than
> once in this timespan ;)
> Code can be found at http://www.feldtech.com/downloads/uThrottledFTP.pas
> (taken directly out of a project - so no examples...) - please note that I
> didn't check if my "extensions" are compatible with ics-ssl (I fear not,
> since I'm "hijacking" DoRecv(), which is used in ssl-implementation too).
>
> ps: I think creating a descendent component for HttpSrv would also be a 
> good
> idea...
> --
> Peter Feldbaumer
> p dot feldbaumer at utanet dot at
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TFtpClient - Quit never returns when not connected!

2006-01-15 Thread Dan
- Original Message - 
From: "Cremaschi Marco - MEDICAE" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Sunday, January 15, 2006 2:00 PM
Subject: Re: [twsocket] TFtpClient - Quit never returns when not connected!


> Hallo, I've a problem using TftpClient.
> I can't obtain a connection, if on a Lan there is a squid proxy server.
> Why??
> Thank you.

Does quit not return when not connected?  Is this at all related? Why use 
the same subject?

-- 
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] Throttling for THttpConnection

2006-01-15 Thread Dan
Yes I use it, I programmed it :) I use it in XanTorrent, a Bittorrent client 
I havent worked on for a long time :-/
You can throttle to as many limits as you like, but each limit uses a new 
TTimer.
You create as many TThrottlers as you like and set their limits, then you 
can assign the throttler to multiple sockets and they will share that limit.

Dan

- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Sunday, January 15, 2006 2:33 PM
Subject: Re: [twsocket] Throttling for THttpConnection


> Thank you. If you use the code perhaps you ucan answer: is it possible to
> apply separate speed limits depending on username and whether the action 
> is
> download or upload?
>
> Best Regards,
>
> SZ
>
> - Original Message - 
> From: "Dan" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Sunday, January 15, 2006 4:06 PM
> Subject: Re: [twsocket] Throttling for THttpConnection
>
>
>> http://www.xantorrent.pwp.blueyonder.co.uk/ics/ThrottledWSocket.zip has
>> some
>> example throttling code.  Only uses one timer and throttles all your
>> connections to one limit.  No sleeping involved.
>>
>> Dan
>>
>> - Original Message - 
>> From: "Fastream Technologies" <[EMAIL PROTECTED]>
>> To: "ICS support mailing" 
>> Sent: Saturday, January 14, 2006 7:47 PM
>> Subject: [twsocket] Throttling for THttpConnection
>>
>>
>>> Hello,
>>>
>>> When I run 32 THttpConnection's in a single worker thread, I cannot use
>>> the
>>> throttling with the Sleep() command like in one-thread/connection design
>>> as
>>> the sleep call blocks the other connections as well since they are in 
>>> the
>>> same thread context. I know that there is a limitation for number of
>>> timers
>>> per process so here is what I tried:
>>>
>>> - created one timer per thread
>>> - paused connections in Sleep place
>>> - resumed them after the calculated ms in timer
>>>
>>> BUT
>>>
>>> - since the timer runs every 20-50 ms (both does the same result), the
>>> sleep
>>> period cannot be less than that! I get inconsistent speed results (for
>>> example, for a 100kBps, I get a fluctuating value between 89-102kBps).
>>> Does
>>> anybody know a good solution for this problem?
>>>
>>> Best Regards,
>>>
>>> SZ
>>>
>>> -- 
>>> To unsubscribe or change your settings for TWSocket mailing list
>>> please goto http://www.elists.org/mailman/listinfo/twsocket
>>> Visit our website at http://www.overbyte.be
>>>
>>
>> -- 
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Throttling for THttpConnection

2006-01-15 Thread Dan
http://www.xantorrent.pwp.blueyonder.co.uk/ics/ThrottledWSocket.zip has some 
example throttling code.  Only uses one timer and throttles all your 
connections to one limit.  No sleeping involved.

Dan

- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Saturday, January 14, 2006 7:47 PM
Subject: [twsocket] Throttling for THttpConnection


> Hello,
>
> When I run 32 THttpConnection's in a single worker thread, I cannot use 
> the
> throttling with the Sleep() command like in one-thread/connection design 
> as
> the sleep call blocks the other connections as well since they are in the
> same thread context. I know that there is a limitation for number of 
> timers
> per process so here is what I tried:
>
> - created one timer per thread
> - paused connections in Sleep place
> - resumed them after the calculated ms in timer
>
> BUT
>
> - since the timer runs every 20-50 ms (both does the same result), the 
> sleep
> period cannot be less than that! I get inconsistent speed results (for
> example, for a 100kBps, I get a fluctuating value between 89-102kBps). 
> Does
> anybody know a good solution for this problem?
>
> Best Regards,
>
> SZ
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket.Dup() ?

2006-01-07 Thread Dan
Seems over the top...
Either have a local var pointing to the socket (make it a TWSocket, not a 
pointer) or just directly access the main form socket.

if mainform.wsocket1.state = wsconnected then 
mainform.wsocket1.sendstr('easy');
or
if mylocalsocketref.state = wsconnected then 
mylocalsocketref.sendstr('easy');

The socket keeps track of its connected status, you dont need to use a 
separate variable.  And if you know the object is a TWSocket, there is no 
reason to use Pointer, use TWSocket.

Dan

- Original Message - 
From: "Michael Preslar" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Sunday, January 08, 2006 12:10 AM
Subject: Re: [twsocket] TWSocket.Dup() ?


> What I ended up doing (Which I'll spit out here just in case anyone else
> ever runs into the same situation .. Or maybe theres a better way):
>
> First define 2 variables..
>
> chatform.socket : pointer;
> chatform.connected : boolean;
>
> Then set the chatform variables
>
> mainform.ConnectToServerClick()
>
>   if not assigned(chatform.socket) then
> chatform.socket := @WSocket1;
>
> mainform.WSocket1.OnSessionConnected()
>
>   chatform.connected := true;
>
>
> mainform.WSocket1.OnSessionClosed()
>
>   chatform.connected := false;
>
> Then, finally, in the chatform, when the user does something and needs
> to send data..
>
> if assigned(socket) and connected then
>   TWSocket(socket).sendstr(s);
>
> Haven't stress tested it or anything yet, but it works well in my
> testing so far.
>
> Wilfried Mestdagh wrote:
>> Hello Michael,
>>
>> You dont need to replicate it. Just leave the Socket where it is. In
>> your second form you can have a socket that points to the other socket.
>> Dont drop one on the second form, but just (I called the socket Cli):
>>
>> SecondForm.Cli := MainForm.Cli;
>>
>> and then you call all in the Cli of the second form witch points to the
>> Cli of the mail form.
>>
>> An object variable is just a pointer to the actual object, so you can as
>> many pointers to the same object as you wants.
>>
>> ---
>> Rgds, Wilfried [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> http://www.mestdagh.biz
> ...
>>> Is this the right way to go? If so, whats the better way to make this 
>>> work?
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] HTTP compression

2005-11-27 Thread Dan
Would still be a good idea to use some version control.  Then people could 
send patches (diffs) to Francois and he could commit them.  Every commit 
would have a log stating whether applications needed to be changed 
(something people have got annoyed about in the past) and people could 
always go back to old versions.

Dan

- Original Message - 
From: "Maurizio Lotauro" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Saturday, November 26, 2005 12:00 AM
Subject: Re: [twsocket] HTTP compression


> On 25-Nov-05 10:03:07 Dan wrote:
>
> [...]
>
>>Has Francois considered using CVS or something similar for ICS?  Could 
>>come
>>in very handy, you could maintain the normal and SSL branches and could
>>merge fixes across both.
>
> The standard ICS and SSL version share the same code. The specific
> SSL parts are in separate files. What happen is that the SSL update
> can be out more often than the standard because it is a work in
> progress. So no branch is needed.
>
>
> Bye, Maurizio.
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] HTTP compression

2005-11-25 Thread Dan
- Original Message - 
From: "Angus Robertson - Magenta Systems Ltd" <[EMAIL PROTECTED]>
To: 
Sent: Friday, November 25, 2005 12:52 AM
Subject: Re: [twsocket] HTTP compression


>> Do you mean latest release, ICS beta or ICS-SSL?
>
> They are all the same code.  Unfortunately none of the recent developers
> have added dates to the code which means version control is very
> painful, but httpprot.pas was dated 19th November, so recent.
> It include a large number of undocumented NTLM changes that you must
> have done, but which were missing from your 28th August version.
> But at least everything is now consolidated.
>

Has Francois considered using CVS or something similar for ICS?  Could come
in very handy, you could maintain the normal and SSL branches and could
merge fixes across both.

Dan

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] [ICS] mmorpg capacity question

2005-11-02 Thread Dan
- Original Message - 
From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, November 02, 2005 5:05 PM
Subject: Re: [twsocket] [ICS] mmorpg capacity question


> Hello Francois,
>
>> Not sure. I think a workstation is limited to a something
>> around one hundred.
>
> I think this is only the case for win9x+ OS. All NT+ versions are very
> high _if_ limited. Limitations on NT+ workstations are max simultanous
> other workstations who are windows networking, but not pure TCP.
>
> I think all my server software at customars is on Server OS, but I test
> on my workstations with sometime very huge connections. However I have
> not a tested case at hand at the moment, and it is too long ago to
> recall.
>
> Next time I have a test case I will publish it here as it is interesting
> for a lot of people.
>


Yes, a lot of people seem to get confused over a '10 maximum connections 
limit' but this relates only to inbound connections to windows file sharing, 
not tcp/ip connections in general.  I think for sockets you are limited only 
by RAM.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Fw: Sync THttpConnection derivative

2005-10-13 Thread Dan
Sounds like a race condition.  Stepping through the code slows the debugged 
thread and stops it occurring.

Dan

- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, October 12, 2005 9:34 AM
Subject: Re: [twsocket] Fw: Sync THttpConnection derivative


>I still have not been able to pinpoint the problem but I have a clue: The 
>AV
> occurs when the ISAPI interface is used to run php5isapi.dll and not other
> ISAPI dll's and I read that PHP5 is not fully thread-safe. So it is 
> probably
> a PHP bug...
>
> Again, thank you very much for your help.
>
> Best Regards,
>
> SubZ
>
> - Original Message - 
> From: "Francois Piette" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Wednesday, October 12, 2005 9:43 AM
> Subject: Re: [twsocket] Fw: Sync THttpConnection derivative
>
>
>>> I did the Attach process trick.
>>
>> I would call it a feature :-)
>>
>>> It is very weird that the bug now does not
>>> occur when I go line-by-line in the debugger but occurs when I hit F9.
>>> :(( I
>>> will continue tomorrow...
>>
>> Use Windows.OutputDebugString here and there to find out where the error
>> occur.
>> Use CTRL+ALT+V to see messages outputed by OutpuDebugMessage.
>>
>> --
>> Contribute to the SSL Effort. Visit
>> http://www.overbyte.be/eng/ssl.html
>> --
>> [EMAIL PROTECTED]
>> Author of ICS (Internet Component Suite, freeware)
>> Author of MidWare (Multi-tier framework, freeware)
>> http://www.overbyte.be
>>
>>
>> -- 
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Fw: Sync THttpConnection derivative

2005-10-12 Thread Dan
You can attach to running process in Delphi to debug a service.

Dan

- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Tuesday, October 11, 2005 10:30 AM
Subject: Re: [twsocket] Fw: Sync THttpConnection derivative


I know have a second very strange problem: I have two .bpr projects for the
same code except that one is for debugging with a dummy form and the other
one is a service. The object creation/destruction orders are the same.
However, when I run the ISAPI code (even once) as below, the service gives
an AV and the "Please tell M$ about this" screen appears. This does not
happen in the form project!

Your constructive response will be appreciated!

Best Regards,

SubZ

- Original Message - 
From: "Francois Piette" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Tuesday, October 11, 2005 10:38 AM
Subject: Re: [twsocket] Fw: Sync THttpConnection derivative


> Debugger, just like the MessageBox showed correct values!

Do you still have message box in the code ? This may cause the problem
because it call the message
pump and wsocket_send may be called from elsewhere. Never use MessageBox to
show values, use
Windows.OutputDebugString or use Writeln (don't forget to make your app a
console mode app).

Maybe I found the problem. WSocket_send is defined as:
function WSocket_send(s: TSocket; var Buf; len, flags: Integer): Integer;

This means you have t call it like this:
   Count := WSocket_send(HSocket,  Data^, DataLen, 0);

See the "^" that I added. Since the Buf argument is declare as untype var,
the compiler
automatically take the address. So when you pas "Data", then it is the
pointer address that is
passed. When you pass "Data^", the actual pointer value is passed.

--
[EMAIL PROTECTED]
http://www.overbyte.be


- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Tuesday, October 11, 2005 9:13 AM
Subject: Re: [twsocket] Fw: Sync THttpConnection derivative


> Debugger, just like the MessageBox showed correct values!
>
> However the socket printed something with a first line like:
>
>  ÿº
>
> (This was suppose to be a long line but OE only printed this much!)
>
> Regards,
>
> SubZ
>
> - Original Message - 
> From: "Francois PIETTE" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Monday, October 10, 2005 7:33 PM
> Subject: Re: [twsocket] Fw: Sync THttpConnection derivative
>
>
> >> I still get garbage data with NO HTTP header.
> >> Any idea why?
> >
> > No idea why. But did you use the debugger to verify that Data and
> > DataLen
> > have correct values ?
> >
> > To debug further, you can add an Windows.OutputDebugString in
> > WSocket_Synchronized_send function to display what is really sent by the
> > component, no matter if called "normally" by the component or by a
> > direct
> > call to WSocket_Send. To see messages printed out by OutputDebugString,
> > you
> > simply hit CTRL+ALT+V within Delphi (Probably the same with BCB).
> >
> > --
> > Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
> > --
> > [EMAIL PROTECTED]
> > http://www.overbyte.be
> >
> >
> >
> >
> > - Original Message - 
> > From: "Fastream Technologies" <[EMAIL PROTECTED]>
> > To: "ICS support mailing" 
> > Sent: Monday, October 10, 2005 4:45 PM
> > Subject: Re: [twsocket] Fw: Sync THttpConnection derivative
> >
> >
> >> Hello and thanks for your replies,
> >>
> >> I now have the following code that do not raise any exception:
> >>
> >> In the connection class derived from TWebConnection:
> >>
> >>Pause();
> >>
> >>int iMode = 0;
> >>WSocket_ioctlsocket(HSocket, FIONBIO, iMode);
> >>
> >>if(!serverThread->DXISAPI->Execute(this,
> >>ISAPIInterpreter,
> >>Method,
> >>Params,
> >>Path,
> >>LastFilePath,
> >>RequestContentType, POSTString,
> >> postedDataLen, scriptResult))
> >>result = dpError;
> >>else
> >>{
> >>iM

Re: [twsocket] Socket one to one

2005-10-08 Thread Dan
- Original Message - 
From: "Werner" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, October 08, 2005 9:02 AM
Subject: [twsocket] Socket one to one


> Hi,
>
> Is it possible to have a socket connection from client to client ?
> Because I need only a 1 to 1 connection, I don't need a server socket who 
> is able to have multiple clients comming in.
>
> Is there a specific whay to have 1 to 1 connection. ?
> Has it any advantages not using serverSocket and only 2 clients-socket if 
> this is possible
>
> Thanks
> Werner
> -- 
> 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
>

At the server end just use a TWSocket instead of a TWSocketServer if you 
only need one client.  Then it needs to listen:
Socket.Listen;
and when a connection comes in (SessionAvailable) you accept it:
Socket.HSocket := Socket.Accept;
Then the connection is established.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] OnClientDataAvailable

2005-10-03 Thread Dan
- Original Message - 
From: "Robert Haditama" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Monday, October 03, 2005 12:14 PM
Subject: Re: [twsocket] OnClientDataAvailable


> Just now, fortunately, i can repeat the situation so
> that the problem raise. Using the log in the
> onclientdataavailable, i see that when the client send
> the 98th, the server receive the 97th message (that's
> already been processed before). Client send the 99th,
> server receive the 97th (again) and the 98th (no
> 99th). Client send the 100th, server receive the 97th
> & the 98th (again), and also the 99th. Just like that,
> goes on and on. But at the same time, the other client
> is processed correctly.
> What's wrong ?
>
> Robert.
>

Post some code, its hard to know whats wrong without.
If I remember correctly, isClient lets you pass a pointer/object and will 
return true if its a client of the twsocketserver.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Converting Send() and Receive() to Sync

2005-09-25 Thread Dan
If you have an access violation you must be trying to access some invalid 
memory.  Debug it to find out where it occurs and figure out why.

Dan

- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Sunday, September 25, 2005 3:39 PM
Subject: Re: [twsocket] Converting Send() and Receive() to Sync


>I thought you could suggest an implementation fix as the design and code is
> simple and according to the KISS principle (Keep It Small and Simple) it
> SHOULD work.. ;)
>
> Best Regards,
>
> SZ
>
> - Original Message - 
> From: "Francois PIETTE" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Sunday, September 25, 2005 5:34 PM
> Subject: Re: [twsocket] Converting Send() and Receive() to Sync
>
>
>>> Ok, I see your point. But still my code seems to be a simpler design.
>>
>> But as you said yourself, it failed.
>>
>>> Did you look at it?
>>
>> Yes, I did.
>>
>> --
>> [EMAIL PROTECTED]
>> http://www.overbyte.be
>>
>> -- 
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Pop-up downloads

2005-09-22 Thread Dan

- Original Message - 
From: "Tom Bolick" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, September 21, 2005 10:00 PM
Subject: Re: [twsocket] Pop-up downloads


> Can you suggest such a sniffer?  
> 

I recommend Analyzer, I think theres a link to it from the WinPCap pages.

Dan
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Connecting and sending in a thread

2005-09-22 Thread Dan
- Original Message - 
From: "Jacco Bezemer" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, September 22, 2005 10:30 AM
Subject: Re: [twsocket] Connecting and sending in a thread


> Helo Francois and Wilfried,
>
> Thanks for your tips. I managed to get it working in a single thread.
>
> I think I need to do this in a thread because the send operation takes
> a long time. This due to the fact that retrieving the data, formatting
> it into XML and sending it eventually is in a loop and is not event
> driven. I'm investigating on how to make this event-driven so I don't
> need multi-threading.
>
> Both many thanks for your input,
> Jacco
>

To clarify what Francois said, you could have a thread that does that 
processing, and posts messages back to your main form with the data, which 
then calls WSocket.Send to send that data.  Then you don't have to worry 
about multithreaded sockets.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] multiple nics and broadcasts

2005-09-16 Thread Dan
Use ReceiveFrom, then use the IPHelper API to find out which network it came 
from based on the IP address.

Dan

- Original Message - 
From: "Kenny Mah" <[EMAIL PROTECTED]>
To: 
Sent: Friday, September 16, 2005 3:50 PM
Subject: [twsocket] multiple nics and broadcasts


> This is a question about how to deal with multiple
> nics and broadcasts.
>
> If I had a computer (A) with multiple nics listening
> to broadcasts, with each nic attached to a separate
> network.
>
> And then I had another computer (B), on one of those
> networks, send a UDP broadcast.
>
> Can computer (A) determine which of its IP
> addresses intercepted the broadcast?
>
> Thanks,
> Kenny
>
>
>
> __
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] [TMimeDec] Beta version to test

2005-09-09 Thread Dan
Ok, you guys need to chill.  I agree with both of you, bugs need to be fixed 
(and documented if they change the usage of the component) and new bugs 
shouldnt be introduced (missing message parts).
Yes,  I know my points are common sense. Just chill.

Dan

- Original Message - 
From: "Angus Robertson - Magenta Systems Ltd" <[EMAIL PROTECTED]>
To: 
Sent: Friday, September 09, 2005 10:17 AM
Subject: Re: [twsocket] [TMimeDec] Beta version to test


> As far as I can see, no-one else in this mailing has attempted to test
> the new TMimeDec component, just me.  I've found it does not work as
> well as the previous component, ignoring complete parts of the email.
>
> The internals of the component are irrelavant to me and most users, we
> really don't care about how clever you are in interpreting RFCs, nor do
> we want to debug your source code to understand how you have changed
> the component in order to prevent it working properly in existing
> applications.  We just want to decode MIME emails.
>
> If it's not backward compatible with existing applications, it's your
> responsibility to document how applications must be changed, at top of
> the TMimeDec component source, not in one of your tedious postings in
> this mailing list.
>
> If the beta TMimeDec is released in it's present state, anyone
> rebuilding an application is likely to find their application useless,
> as I have.  So it should not be released until these problems are
> resolved.
>
> Of course I may be wrong, I make errors.  So perhaps everyone else that
> has tested the beta TMimeDec component can now post their results?
>
> Angus
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] 64-bit FTP support

2005-09-07 Thread Dan
- Original Message - 
From: "Angus Robertson - Magenta Systems Ltd" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, September 07, 2005 12:53 AM
Subject: Re: [twsocket] 64-bit FTP support


>> Are you sure you were using soBeginning, soEnd etc. instead of
>> soFromBeginning, soFromEnd.
>> I had this problem when I started using int64 streams and that was the
>> solution.
>
> These have the same numeric values so should not make any difference to
> how the stream is used.
>
> soFromBeginning = 0; soFromCurrent = 1; soFromEnd = 2;
> TSeekOrigin = (soBeginning, soCurrent, soEnd);
>
> My problem was that although code insight suggests the Int64 version
> was being called, there was a range error as soon as the offset
> exceeded a longint, so the compiler must have been used the longint
> version.
>
> function Seek(Offset: Longint; Origin: Word): Longint; overload; virtual;
> function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
>
One uses a Word for the origin, one uses a TSeekOrigin.  If you pass 
soFromBeginning, its a word so it uses the Longint version.  If however you 
pass soBeginning, it is a TSeekOrigin so it uses the Int64 version. At least 
in my experience.  I think it should be better documented.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] 64-bit FTP support

2005-09-06 Thread Dan
- Original Message - 
From: "Angus Robertson - Magenta Systems Ltd" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, September 06, 2005 4:45 PM
Subject: [twsocket] 64-bit FTP support


> ...
> proved a pain during testing because the integer overloaded Seek seemed
> to be linked rather than int64 version, so I had to code my own Seek64
> function.
> ...

Are you sure you were using soBeginning, soEnd etc. instead of 
soFromBeginning, soFromEnd.
I had this problem when I started using int64 streams and that was the 
solution.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TnEmulVT: Number Rows - Important!!!!

2005-09-06 Thread Dan
- Original Message - 
From: "Francois Piette" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Tuesday, September 06, 2005 1:29 PM
Subject: Re: [twsocket] TnEmulVT: Number Rows - Important


>I think there is some language problem between us.
> I am sorry to have upset to you.
>

Yes, seem to be some communication problems.
I think he is looking for the telnet escape sequence to notify the server 
that the terminal size has changed.  Maybe it is in the telnet rfc, I'm not 
sure.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How can i Change Time mode

2005-09-06 Thread Dan
- Original Message - 
From: "Marwan" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, September 06, 2005 9:56 AM
Subject: Re: [twsocket] How can i Change Time mode


> Thanx  i want a  Delphi or API function to change mode time--- On Tue 
> 09/06, Barnard Peter < [EMAIL PROTECTED] > wrote:From: 
> Barnard Peter [mailto: [EMAIL PROTECTED]: 
> [EMAIL PROTECTED]: Tue, 6 Sep 2005 10:43:50 +0200Subject: Re: 
> [twsocket] How can i Change Time modeGo 'Control Panel' -> 'Regional 
> And Language Options' -> In

TWSocket.SendStr('shush'); 

-- 
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] NO_ADV_MT symbol

2005-09-03 Thread Dan
- Original Message - 
From: "Francois Piette" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Friday, September 02, 2005 12:30 PM
Subject: Re: [twsocket] NO_ADV_MT symbol


>> > IMO it is better design to have all access to a given
>> > component from only one thread. And in that case, you can
>> > define NO_ADV_MT to have better performances because you
>> > avoid using a critical section.
>>
>> Thank you, this answers my questions.
>>
>> I use 2 servers and some clients in same exe, but seperate threads. 
>> Atually
>> all is controlled from main, but only by posting messages, so no threads 
>> or
>> components in them is touched from outside the thread. And no
>> sockets/components is switched from one thread to another.
>>
>> I will then define the NO_ADV_MT and I will get improved performance?
>
> You should. Improvement will be significant if you have a slow processor 
> and a fast network. It will
> be neglectible if you have a fast processor and slow network.
>

negligible :) 

-- 
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] FTPClient speeds

2005-09-01 Thread Dan
- Original Message - 
From: "Piotr Dalek" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, September 01, 2005 6:52 PM
Subject: Re: [twsocket] FTPClient speeds


> Hello!
>
> I wrote a write-buffering stream. Anyone interested? Adding read and seek
> support and extending it so it can write to other streams shouldn't be
> difficult.
> 

I thought windows buffered writes anyway? Is this so you can have a larger 
buffer or something completely different?

Dan


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Download time

2005-08-31 Thread Dan
- Original Message - 
From: "G. M. Faggiano" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, September 01, 2005 2:58 AM
Subject: [twsocket] Download time


> Hello,
>
> I'm trying to write a little app that downloads a file from my server at
> regular intervals and tells me what my true connection speed is.
> I'm doing this because I use a broadband connection through my lan.  So,
> I have no real way to check my current speed without going to one of
> those online speed tests.  I just want to represent my speed in mps via
> an icon in my system tray.  If anyone has a better Idea on how to get
> the result I'm after, please tell me.  Here is what I'm doing now.
>
> I'm using a ThttpCli to download a 500kb file from my server.  I could
> go bigger, but I have a 6000mb transfer limit per month on my server.  I
> would rather do this another way, but this is the only way I know of.
> Still, doing it this way, I can't figure out how to determine the time
> it took to download the file.  I hope this makes sense to someone.
>
> Also, Francois, your components are awesome!  I've been using them for
> about two years now.  I'll be sure to send you a post card.

Use GetTickCount when you start the transfer and store the value somewhere. 
When the request is complete, if the download was successful, use 
GetTickCount again, subtract the original value and you have the tick taken 
in milliseconds.  Are you using cable or some form of DSL? Maybe the modem 
has a way to get the connection speed, via snmp or by looking at its 
configuration pages.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] HttpCli: Opinion wanted !

2005-08-29 Thread Dan
- Original Message - 
From: "Guillaume MAISON" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Monday, August 29, 2005 12:48 PM
Subject: Re: [twsocket] HttpCli: Opinion wanted !


>hmmm... never meant it would be easy to implement, but to use...
>
>i think that's one of Midware's strength. As the code has already been
>written, it could be possible to use the same design pattern...
>
>the easier part would be then that the settings for each coding class
>would be encircled to the component itself and not its container (the
>THttpCli).
>
>IMHO,

>From what I've been reading, it sounds like a good solution.  Keeps the 
whole thing extensible for many different encoding methods.

Dan

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Difference between LocalAddr and Addr

2005-08-24 Thread Dan
- Original Message - 
From: "Francois Piette" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, August 24, 2005 7:34 AM
Subject: Re: [twsocket] Difference between LocalAddr and Addr


>> 1.  I am not sure I understand the difference between "Local Addr" and
>> "Addr" on the twsocket component.  I am guessing that one of them 
>> (probably
>> Local Addr) is the IP address that the component is bound to and the 
>> other
>> address is the IP address we are sending to?
>
> Yes it is.
>
>> 2.  How to find an open port to send and receive from?
>
> Just try and check for error "address already in use" exception.

Alternatively, if you just want a temporary random port to listen on you can 
specify port 0.  The OS will then assign an unused port.  There is a winsock 
method to then get the port it chose, but I can't remember what it is off 
the top of my head.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Bandwidth control

2005-08-23 Thread Dan
I think I've fixed the bug with the connection closing before all data is 
received.  However, I am now getting strange throttling speeds, whereas in 
the past it was always throttled at the correct speed.  Maybe I have 
accidentally changed something in the throttling code or maybe my FTP client 
is playing up.  Give the new version a try, and if the speeds act up for you 
see if there are any differences in the throttling procedure between the two 
versions.
New version is now at 
http://www.xantorrent.pwp.blueyonder.co.uk/ics/ThrottledWSocket.zip
I've had a look at the smatters throttling code but I think it needs your 
socket code to be in a separate thread.  If thats ok for your purposes its 
probably the better option.

Dan

- Original Message - 
From: "Darin McGee" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Monday, August 22, 2005 9:16 PM
Subject: Re: [twsocket] Bandwidth control


Here is another throttle for TWSocket

http://www.smatters.com/ics/

Darin



From: [EMAIL PROTECTED] on behalf of David A. G.
Sent: Mon 8/22/2005 12:41 PM
To: ICS support mailing
Subject: Re: [twsocket] Bandwidth control



Dan, I tried to upload files into the server and all files was broken. I
think the last chunk of data is not saved.
In the other hand downloading files from the server is working good.

If you have some new update please tell me, I was finding for this kind of
code for a long time...

thanks,
David

----- Original Message -
From: "Dan" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Monday, August 22, 2005 8:32 AM
Subject: Re: [twsocket] Bandwidth control


> As in uploading to the ftp server?
> I'll look into it.
>
> Dan
>
> - Original Message -
> From: "David A. G." <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Monday, August 22, 2005 2:09 AM
> Subject: Re: [twsocket] Bandwidth control
>
>
>> Dan,
>>
>> Thanks for your code, I think the upload algorithm has a bug because my
>> test
>> file is not completely uploaded :(, but the download is great.
>>
>> David
>>
>>
>>
>>
>> - Original Message -
>> From: "Dan" <[EMAIL PROTECTED]>
>> To: "ICS support mailing" 
>> Sent: Sunday, August 21, 2005 9:13 PM
>> Subject: Re: [twsocket] Bandwidth control
>>
>>
>>> http://www.xantorrent.pwp.blueyonder.co.uk/ics/ThrottledWSocket.zip
>>>
>>> Has ThrottledWSocket and ThrottledFTPSrv.  Should be easy to do the same
>>> for
>>> HTTP.
>>>
>>> Dan
>>>
>>> - Original Message -
>>> From: "David A. G." <[EMAIL PROTECTED]>
>>> To: 
>>> Sent: Sunday, August 21, 2005 11:42 PM
>>> Subject: [twsocket] Bandwidth control
>>>
>>>
>>>> Hello, I'm finding an example of how to control the bandwidth in HTTP
>>>> and
>>>> FTP server, any one has?
>>>> thanks in advance,
>>>> David
>>>>
>>>> --
>>>> To unsubscribe or change your settings for TWSocket mailing list
>>>> please goto http://www.elists.org/mailman/listinfo/twsocket
>>>> Visit our website at http://www.overbyte.be
>>>>
>>>
>>> --
>>> To unsubscribe or change your settings for TWSocket mailing list
>>> please goto http://www.elists.org/mailman/listinfo/twsocket
>>> Visit our website at http://www.overbyte.be
>>
>> --
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
>>
>
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be








> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Bandwidth control

2005-08-22 Thread Dan
As in uploading to the ftp server?
I'll look into it.

Dan

- Original Message - 
From: "David A. G." <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Monday, August 22, 2005 2:09 AM
Subject: Re: [twsocket] Bandwidth control


> Dan,
>
> Thanks for your code, I think the upload algorithm has a bug because my 
> test
> file is not completely uploaded :(, but the download is great.
>
> David
>
>
>
>
> - Original Message - 
> From: "Dan" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Sunday, August 21, 2005 9:13 PM
> Subject: Re: [twsocket] Bandwidth control
>
>
>> http://www.xantorrent.pwp.blueyonder.co.uk/ics/ThrottledWSocket.zip
>>
>> Has ThrottledWSocket and ThrottledFTPSrv.  Should be easy to do the same
>> for
>> HTTP.
>>
>> Dan
>>
>> - Original Message - 
>> From: "David A. G." <[EMAIL PROTECTED]>
>> To: 
>> Sent: Sunday, August 21, 2005 11:42 PM
>> Subject: [twsocket] Bandwidth control
>>
>>
>>> Hello, I'm finding an example of how to control the bandwidth in HTTP 
>>> and
>>> FTP server, any one has?
>>> thanks in advance,
>>> David
>>>
>>> -- 
>>> To unsubscribe or change your settings for TWSocket mailing list
>>> please goto http://www.elists.org/mailman/listinfo/twsocket
>>> Visit our website at http://www.overbyte.be
>>>
>>
>> -- 
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Bandwidth control

2005-08-21 Thread Dan
http://www.xantorrent.pwp.blueyonder.co.uk/ics/ThrottledWSocket.zip

Has ThrottledWSocket and ThrottledFTPSrv.  Should be easy to do the same for 
HTTP.

Dan

- Original Message - 
From: "David A. G." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 21, 2005 11:42 PM
Subject: [twsocket] Bandwidth control


> Hello, I'm finding an example of how to control the bandwidth in HTTP and
> FTP server, any one has?
> thanks in advance,
> David
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Transfer with UDP

2005-08-20 Thread Dan
- Original Message - 
From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Saturday, August 20, 2005 8:39 AM
Subject: Re: [twsocket] Transfer with UDP


> Hello Dan,
>
>>> Buffer : array [0..5] of char;
>
> Variables on the stack does not consume time. Only if something has to
> be initialized or so, like for example a long string.
>

I meant setting the socket bufsize.  Not sure how its handled internally, 
but surely setting it every time the event is called is wasteful.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Hi, I've a question

2005-08-19 Thread Dan
- Original Message - 
From: "Juan Pablo Franco" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Friday, August 19, 2005 5:34 PM
Subject: Re: [twsocket] Hi, I've a question


> Hi Dan,
>
> I understand you, but the problem is that the paint process in Receive
> machine must paint at the same time that the paint process in the Sent 
> machine.
> Here is the central point because the UDP protocol is asyncronous and I
> need two process in the same time in both machines.
>
> Juan
>

I am really confused by what you are doing.  Could you try explaining more 
clearly what the sender and receiver are trying to achieve.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Transfer with UDP

2005-08-19 Thread Dan
- Original Message - 
From: "Juan Pablo Franco" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Friday, August 19, 2005 5:16 PM
Subject: Re: [twsocket] Transfer with UDP


> RECEIVE MACHINE:
> procedure TFVisor.overlayListenDataAvailable(Sender: TObject; ErrCode: 
> Word);
> var
> Buffer : array [0..5] of char;
> Src: TSockAddrIn;
> Len, SrcLen: Integer;
> s:string;
> begin
> overlayListen.BufSize := 16384;
>

I would set the BufSize when you create the socket, or during application 
initialisation, rather than repeatedly in the the data available handler.
But like others, I'm not convinced you need UDP.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Hi, I've a question

2005-08-19 Thread Dan
Yes, it looks that way.  Therefore, the problem is that he is processing it 
before checking he has received it all, as Guillaume said.

Dan

- Original Message - 
From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Friday, August 19, 2005 3:52 PM
Subject: Re: [twsocket] Hi, I've a question


> Maybe ProcessMessage(s) is a call to a function to process the received
> data and not Application.ProcessMessage ? Juan can you explain ?
>
> ---
> Rgds, Wilfried
> http://www.mestdagh.biz
>
> Friday, August 19, 2005, 16:15, Francois Piette wrote:
>
>>> procedure TFVisor.overlayListenDataAvailable(Sender: TObject; ErrCode: 
>>> Word);
>>> begin
>>>   ...
>>>   processMessage(s);
>>>   ...
>>> end;
>
>> That is the problem. You defenitely can't call ProcessMessages from most 
>> of the event handler of ICS
>> components and for sure not from OnDataAvailable.
>
>> Why do you think you need to call ProcessMessages ?
>
>> --
>> [EMAIL PROTECTED]
>> http://www.overbyte.be
>
>
>> - Original Message - 
>> From: "Juan Pablo Franco" <[EMAIL PROTECTED]>
>> To: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
>> Cc: 
>> Sent: Friday, August 19, 2005 3:44 PM
>> Subject: Re: [twsocket] Hi, I've a question
>
>
>>> Hi Wilfried,
>>>
>>> The problem is present because I test of data in the sent machine and 
>>> the
>>> data not is the same in Receive machine.
>>> If I send 30Kb of data, in the other machine receive 7Kb only; and I 
>>> don't
>>> know what is the problem.
>>> Send you part of code of application, but I know that information is 
>>> sent
>>> and not all receive.
>>> Thanks again.
>>> Bye.
>>> Juan Pablo Franco
>>>
>>>
>>> SENT MACHINE
>>> overlaySocket.SendStr(Msg);
>>>
>>>
>>> RECEIVE MACHINE:
>>> procedure TFVisor.overlayListenDataAvailable(Sender: TObject; ErrCode: 
>>> Word);
>>> var
>>>  Buffer : array [0..5] of char;
>>>  Src: TSockAddrIn;
>>>  Len, SrcLen: Integer;
>>>  s:string;
>>> begin
>>>  overlayListen.BufSize := 16384;
>>>  SrcLen := SizeOf(Src);
>>>  overlayListen.Receive(@Buffer, SizeOf(Buffer));
>>>  s:=StrPas(Buffer);
>>>
>>>   processMessage(s);
>>>   ...
>>> end;
>>>
>>>
>>>
>>>
>>> At 10:16 19/08/2005, you wrote:
>>> >Hi Juan,
>>> >
>>> >Yes please tell me what the problem is. BTW if you ask on mailing list 
>>> >I
>>> >will answer too, and also lots of other people will help there.
>>> >
>>> >---
>>> >Mvg, Wilfried
>>> >http://www.mestdagh.biz
>>> >
>>> >
>>> >--- Original message from Juan Pablo Franco ---
>>> >Date:Friday, August 19, 2005
>>> >Time:15:04
>>> >Subject: Hi, I've a question
>>> >
>>> > > Hi partner, I reading your paper about Receiving High speed data and 
>>> > > i
>>> > > don't use this example in my application.
>>> > > When I process message I can't read data sent. The data sent is a 
>>> > > string,
>>> > > many strings. Puntually, 360 strings per second and one string 
>>> > > conteined
>>> > > many information.
>>> > > Can you help me?
>>> > > I'm sorry, but I am from Argentina and my english not is good.
>>> > > Bye and thanks.
>>> >
>>> > >  Juan Pablo
>>>
>>> -- 
>>> To unsubscribe or change your settings for TWSocket mailing list
>>> please goto http://www.elists.org/mailman/listinfo/twsocket
>>> Visit our website at http://www.overbyte.be
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] NOOP workaround

2005-08-18 Thread Dan
It can be useful if connecting through a socks proxy, since some disconnect 
you after 60 seconds of inactivity for example, so you can't let the control 
connection be idle whilst transferring.

Dan

- Original Message - 
From: "Angus Robertson - Magenta Systems Ltd" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, August 18, 2005 5:13 PM
Subject: Re: [twsocket] NOOP workaround


>> for sending noops while uploading (to keep the control connection
>> alive) i done some bad things ;-)
>
> Which FTP server needs this?  I upload 20 meg files all the time and
> never see this with IIS/5 or ICS FTP server.
>
> Did you try using a valid command like PWD rather than NOOP?
>
> Angus
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] component question

2005-08-17 Thread Dan
- Original Message - 
From: "Francois Piette" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, August 17, 2005 3:01 PM
Subject: Re: [twsocket] component question

> You have to change TFtpProgress data type to use an int64. Don't forget to 
> rebuild the package and
> reinstall it so that delphi use the correct version.
>
> btw: How have you changed to int64 ?
> You should have replaced all integer or LongInt by a new custom type which 
> is conditionnaly defined.
> Similar to this:
>
> {$IFDEF COMPILER6_UP}
>{$DEFINE Use64BitFiles}
> {$ENDIF}
>
> {$IFDEF Use64BitFiles}
>FtpInteger = int64;
> {$ELSE}
>FtpInteger = integer;
> {$ENDIF}
>
> and later in the code use FtpInteger where 64 bit is desirable.
> Doing so make the code compatible with older compiler version.
> You can easily to a search and replace of your int64 by FtpInteger.
>


If there are any StrToInt make sure they are change to StrToInt64 too.

Dan 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] [FTPCli] - Quote Method

2005-08-17 Thread Dan

- Original Message - 
From: "Artem Antonov" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Tuesday, August 16, 2005 8:48 AM
Subject: [twsocket] [FTPCli] - Quote Method


> Hello!
> 
> I want to set file attributes on FTP server and use such commands:
> 
> FtpClient.HostDirName := '/my_dir/';
> ExecuteCmd(FtpClient.Cwd, FtpClient.CwdAsync);
> 
> FtpClient.HostFileName := 'test.txt';
> FtpClient.LocalFileName := 'chmod 644 test.txt';
> ExecuteCmd(FtpClient.Quote, FtpClient.QuoteAsync);
> 
> But from FTP server I get:
> 
> 16.08.2005 10:36:17 - Executing requested command...
>> chmod 644 test.txt
> < 500 'CHMOD': command not understood.
> Request 33 done
> Status code = 500.
> 
> How I can set file attributes or where is I am wrong?
> 
> Thanks!
> 
> Best regards,
> Artem Antonov.

Try SITE CHMOD.  There's no guarantee it will work though.

Dan
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Httpserver and threads

2005-08-16 Thread Dan
- Original Message - 
From: "Tom York" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Tuesday, August 16, 2005 3:48 PM
Subject: Re: [twsocket] Httpserver and threads


>I do not want multithreading.  I assume that each connection is a thread,
> no?  The images are broken, partially displayed, the image is displayed as
> text characters.
>
> Maybe this will help, here is my code so far:
>
> procedure TForm1.HttpServer1GetDocument(Sender, Client: TObject;
>  var Flags: THttpGetFlag);
> var
>  C: THttpConnection;
> begin
>  C := THttpConnection(Client);
>
>  if C.Path = '/' then
>  begin
>ShowDirectory(Sender, Client, Flags);
>Exit;
>  end;
>
>  if FileExists(C.Document) and (Pos('image', C.Params)>0) then
>  begin
>ShowShowimage(Sender, Client, Flags);
>Exit;
>  end;
> end;
>
> procedure TForm1.ShowThumb(Sender, Client: TObject; Flags: THttpGetFlag);
> var
>  i: Integer;
>  C: THttpConnection;
>  JPeg: TJPegImage;
>  ar: Double;
>  nx, ny: Integer;
>  ms: TMemoryStream;
> begin
>  C := THttpConnection(Client);
>  Flags := hgSendStream;
>  ms := TMemoryStream.Create;
>  JPeg := TJPegImage.Create;
>  JPeg.LoadFromFile(C.Document);
>
>  if Jpeg.Width > 100 then
>  begin
>ar := 100 / JPeg.Width;
>nx := Round(JPeg.Width * ar);
>ny := Round(JPeg.Height * ar);
>ResizeJPeg(JPeg, nx, ny);
>  end;
>
>  JPeg.SaveToStream(ms);
>  JPeg.Free;
>  C.DocStream := ms;

Did you forget ms.position := 0;
I'm not sure if its needed or not.

>  C.AnswerStream(Flags, '', 'image/jpeg', '');
> end;
>

Dan

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TPop3Cli is halted while receiving a message over 4Mb

2005-08-11 Thread Dan
Theres a very good, and free one called Analyzer that uses WinPCap.  There 
used to be a link from the winpcap page, not sure if its still there.

Dan

- Original Message - 
From: "Stanislav Korotky" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, August 11, 2005 3:47 PM
Subject: Re: [twsocket] TPop3Cli is halted while receiving a message over 
4Mb


> >It is not a proxy that you need but a sniffer.
>>If you want a free one, look at Ethereal (link on the links page at my 
>>website).
>
> Oh! Its size is 11Mb. I'd prefer to not download and install such a big 
> thing.
> I installed WinPcap and tried to use Magenta Systems Monitor Socket,
> but it shows AV (nil is dereferenced, I presume; adapter listbox is empty)
> at the start though continues to run. Nevertheless it does not capture
> anything ;-(. I don't see any pages on http://www.magsys.co.uk/ , which
> are related to the program. Perhaps, a newer version is available 
> somethere.
>
>>A sniffer peek data packet on the network cable without interfering with 
>>applications. It works at
>>the NDIS driver level, asking the driver to receive a copy of each packet 
>>sent/received.
>>
>
> Best wishes,
> Stanislav Korotky,
> Russia, Moscow, CET +02:00
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] NOOP

2005-08-10 Thread Dan
Most servers will respond to a NOOP during a transfer.  Not sure if the FTP 
Client component lets you send one though...might give you a busy exception. 
Not sure of the best way around this, might have to derive your own 
component to do it.

Dan

- Original Message - 
From: "Roland Frei" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, August 10, 2005 12:27 PM
Subject: [twsocket] NOOP


> hi
> my ftp connection crashes on long files (after 2 houres or so)
> so i need to send a noop every minute.
> how can i do it ?
> thank you for helping.
> roland
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TSyncSmtpCli - ConnectSync results in 10004 error

2005-08-09 Thread Dan
Its something to do with an interrupted call...maybe its a firewall or 
something doing the blocking but its configured to allow Outlook Express?

Dan

- Original Message - 
From: "Boxer" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, August 09, 2005 3:28 PM
Subject: [twsocket] TSyncSmtpCli - ConnectSync results in 10004 error


> Hi
>
> I've been successfully using TSyncSmtpCli for some time. One installation
> has a problem connecting to an exchange server. On ConnectSync I get a 
> 10004
> error. Does anyone know how I can get round this? The server seems fine - 
> OE
> can use it no bother.
>
> Cheers, Boxer
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


  1   2   >