Re: [twsocket] RES: Shared handles problem

2013-05-18 Thread François Piette
If you find something, please let us know!
By the way, the mechanism is in use for year. If there is a flaw, it could
only be in a special corner case otherwise we already fixed it.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be
http://francois-piette.blogspot.com




-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la
part de Eric Fleming Bonilha
Envoyé : vendredi 17 mai 2013 22:27
À : twsocket@elists.org
Objet : [twsocket] RES: Shared handles problem

Well

 

I have seen that you UnregisterMessage routine already removes messages from
the queue:

 

if FHandle  0 then

while PeekMessage(LMsg, FHandle, Msg, Msg, PM_REMOVE) do {loop} ;

 

Strange.. must be something else, I will keep digging!

 

Eric

 

De: Eric Fleming Bonilha [mailto:e...@digifort.com.br] Enviada em:
sexta-feira, 17 de maio de 2013 17:11
Para: twsocket@elists.org
Assunto: Shared handles problem

 

Hello ICS team,

 

I´m currently using your implementation of shared handles in all my
applications (I have actually removed all AllocateHwnd and changed to use
your implementation in your to share handles between objects and save some
OS resources), and I think that I have found a flaw in the system but I´m
not sure how to fix.

 

The problem that I´m facing is that “Unsent” messages are being received
sometimes… After a lot of debugging and testing I think that I have came to
a conclusion:

 

In my tests, I create many objects and destroy them, so, there are many
operations to allocate handles (From your lib) and deallocate them… What I
could observe is that if I create an object (Allocating a shared message
from your system), send a message to it and destroy it (deallocating this
message), and creating more objects, the message ID that was allocated to a
previous object (already freed) is now allocated to a new object, and the
message that was posted is still not received.. so, when the main thread
actually process the message and tries to dispatch the message, it will be
dispatched to this new object, creating a great mess in the software

 

So… I´m not expert in your structure.. but could that scenario occur? 

 

Thanks!

 

Eric

--
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] Close connection (destroy) idle clients

2013-04-30 Thread François Piette
 Hello, I am using the example OverbyteIcsThrdSrvV3.dpr plus what happens
is that the wind 
 ClientDisconnect is called before processing the received data, and so the
connection is lost 
 and I can not communicate with the client, it returned me the error 10053
as log below:

TcpSrv (c) 2005-2010 by François Piette. V3.00
  TWSocket (c) 1996-2012 Francois Piette V7.87
  TWSocketServer (c) 1999-2011 F. Piette V7.04 Waiting for clients ...
Client connected. Remote: 192.168.25.93/4634 Location:
192.168.25.66/5760ThrdID: $ 4,532 ThrdCnt: # 1 There is now 1 clients
connected.
Received from 192.168.25.93: 'ACTION = SOLIC_FLUXO  ID_TERMINAL =
528-533-378  COD_EVENTO = 1579  TPEMISSAO = 0'
Client disconnecting: 192.168.25.93 Duration: 00:00:21 Error: 10053 ThrdID:
$ 4,532 ThrdCnt: # 1
There is now 0 clients connected.

As far as I understand, the client disconnect to fast, without waiting for
the server's answer. So you have to look at the client to understand why it
doesn't wait the response from the server.

Or maybe the client is not supposed to receive a reply from the server, in
which case it is perfectly normal to close the communication on his side.
And of course the server should not send any reply.

If I misunderstood your problem, please try to explain it using other words.
Don't forget to illustrate the protocol in use between client and server.


-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be
http://francois-piette.blogspot.com




--
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] Close connection (destroy) idle clients

2013-04-30 Thread François Piette
 WSocket only with WSocketServer WSocketThrdServer and that this problem
occurs, it takes is 
 a message exchange (string) between client and server with multiple
clients connected 
 simultaneously, the problem with the component WSocket that is working is
that if a 
 customer taking disconnect the network cable, I can not check if there is
a socket opened 
 in ClientThread to destroy it and thereby leaving many threads created
without ...

Is this the same issue as the one related in your previous message ? It
seems not. But this looks closer to the subject.

To close inactive clients, the easiest way is to record the last time a
client sent a request and periodically check the client list and close all
client which had no more activity since a give amount of time.

By the way, why are you using a multithread version ? usually, multithread
applied to simply do not scale very well. Using ICS, properly, you can
usually serve hundreds of client with only a single thread. It is a bad idea
to create a thread for each client, especially if most client are not really
active.

You should create a thread only to execute lengthy requests a client may
send. Any request which execute fast should not have his own thread. And of
course, you should not create and destroy threads but instead a thread pool.

Correctly handling multithreading is frequently difficult for the
unexperimented multithreading developer.

All this being said, I have not enough information to be able to give you
better advice. I can only stay general.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be
http://francois-piette.blogspot.com







--
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] Close connection (destroy) idle clients

2013-04-30 Thread François Piette
 How to implement the time of the last action on the event and then check
OnDataAvailable?

Assuming you use ThrdSrv: Add a filed in the class TThrdSrvClient which is
instanciated for each client connecting. Update this filed for datetime of
the last message sent by the client, probably from the Datavaialble event
hanlder.

Then from the outside, for example using a TTimer triggered avery 30 sec,
iterate thru the client list of the server component and check the last
message datetime of each client, calling Abort should that time be greater
than a given timeout value.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be
http://francois-piette.blogspot.com


--
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] Close connection (destroy) idle clients

2013-04-30 Thread François Piette
 I'm doing based on the example MtSrv, would be the best for my case?

Have you looked at the comments in front of MtSrv sample ?
Here is is:
    MtSrv is an old sample program 
   It works OK, but you should use ThrdSrv project 

I will assume you'll use ThrdSrv sample program.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be
http://francois-piette.blogspot.com





--
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] MagFtp and SslContext

2013-04-17 Thread François Piette
 My application is a LAN backup application and users want to use FTP to
additionally secure their data. 

SSL certificates are used to make sure the client connect to the server it
thinks it connect and that the server is sure about who is the client.
Encryption of data take place even if there is no certificate involved.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be
http://francois-piette.blogspot.com





--
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] i using the THttpAppSrv in my app

2013-04-17 Thread François Piette
Given your answer, I probably miunderstood your question.
Maybe you should reformulate using other words and elaborating a little bit 
more.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be
http://francois-piette.blogspot.com




-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la 
part de myiisvif
Envoyé : mercredi 17 avril 2013 03:23
À : twsocket
Objet : Re: [twsocket] i using the THttpAppSrv in my app

the request only can be added to the AddGetHandler  proc.
and it can not using the MASK. eg:

 myweb.AddGetHandler('/*.asp',tasp_proc); 

can be??

that is why i will use the Tsrv_myapp.mywebGetDocument proc.  because it can be 
hold everything.

btw,.AddGetHandler is a thread work mode??




myiisvif

From: François Piette
Date: 2013-04-17 02:25
To: 'ICS support mailing'
Subject: Re: [twsocket] i using the THttpAppSrv in my app
 i found if i call the wmi ole object to get wmi data,THttpAppSrv  will
hung and lose the 80 connection.
procedure Tsrv_myapp.mywebGetDocument(Sender, Client: TObject;
  var Flags: THttpGetFlag);
the call the wmi object...
for just two or three times.
why? bug?

I'm not sure I understand clearly your problem...
If the call you are doing is blocking, then you should consider moving it to a 
worker thread so that THttpAppSrv can serve other connections meanwhile.
You may call AnswerXXX and Finish when the thread has finished his work.

--
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be
http://francois-piette.blogspot.com




--
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

--
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] i using the THttpAppSrv in my app

2013-04-16 Thread François Piette
 i found if i call the wmi ole object to get wmi data,THttpAppSrv  will
hung and lose the 80 connection.
procedure Tsrv_myapp.mywebGetDocument(Sender, Client: TObject;
  var Flags: THttpGetFlag);
the call the wmi object...
for just two or three times.
why? bug?

I'm not sure I understand clearly your problem...
If the call you are doing is blocking, then you should consider moving it to
a worker thread so that THttpAppSrv can serve other connections meanwhile.
You may call AnswerXXX and Finish when the thread has finished his work.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be
http://francois-piette.blogspot.com




--
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 and data packet length

2013-02-21 Thread François Piette
 Can the network topology (different switches or hub) give different
results about this ?

Yes, it can.
Jumbo frames must be supported end-to-end. Each device has to support it and
be configured for it.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be
http://francois-piette.blogspot.com




--
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 and data packet length

2013-02-20 Thread François Piette
I need to send a data packet in one chunck.
Today the datas are splitted in two chunks, one of 1500 (the MTU limit) and
another one for the rest.
 I'm not able to go over this 1500 limit. I know it's possible because I
have another program how does it like this

What you ask is to use Jumbo Frames which is available on some gigabit
ethernet systems. Jumbo frames are handled by the OS, not Winsock API
(TWSocket make use of Winsock API of course).

Altough not tested, you should probably do the following:
- Set SocketSndBufSize to some large value
- Set BufSize to at least the same large value
- Send your data as usual.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be
http://francois-piette.blogspot.com




--
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] Resend: TSslSmtpCli...

2013-01-25 Thread François Piette
 I have seen TSslSmtpCli mentioned a couple of places but very little data.
 Does such a thing exist? Is it part of the ICS-SSL suite?

Sure it exists. Starting from ICS-V7, ICS-SSL is included in the sntadard
distribution. There is no separate source code. For example TSslSmtpCli is
included in the same source as TSmtpCli component. It is enabled when you
define the symbol USE_SSL.
 
There are also demo programs included in the distribution. See
{InstallDir}\Delphi\SslInternet folder.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be
http://francois-piette.blogspot.com




--
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] Client[Index]

2013-01-19 Thread François Piette
 How can I get the Client Index when the client connected ...
 Suppose we have 10 client have already connected ... and then 1 client
disconnected ...
 when the other client connected  which index will get for that new
client ... ?

Please explain why you need the client index ? I ask because this value will
change is clients connect and disconnect. So it is not a good idea to base
anything on that value.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be
http://francois-piette.blogspot.com




--
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] Wait for

2013-01-12 Thread François Piette
 Using HTTPCLI AsyncGET how main thread wait for the Async to download 
 the html code.
 Code relies on input html code. If i sleep the main ui thread it will 
 become frozen.
 
 I know how to get HTML with Async via Events but i have no idea how 
 program it so that Main UI thread will wait and then continue.. :)

 use a timer. The HTML fetches your stuff async and stores it somewhere 
 and sets some get was successfull flag.

Defenitely not ! Use the http component OnRequestDone handler to handle what
has to be done. At most you use a timer to implement a timout feature, not
more.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
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] Wait for

2013-01-12 Thread François Piette
 Using HTTPCLI AsyncGET how main thread wait for the Async to download the
html code.
 Code relies on input html code. If i sleep the main ui thread it will
become frozen.
 I know how to get HTML with Async via Events but i have no idea how
program it so 
 that Main UI thread will wait and then continue.. :)

The component has Sync methods as well? Those are based on the Async
methods (native) using a wait loop.
It is much much better to use only async methods. This requires you develop
your application with async in mind. This means you don't write code
sequentially but rather use the events.

At first glance, asynchronous programming is a little bit more difficult to
grasp, but once you get it, you'll see it is really easy and powerful? After
all, Windows UI is fully asynchronous and event driven: you never wait that
the user click on a button. Instead you handle processing in the OnClick
handler. This is exactly the same with ICS component: you start an operation
(such as a http get) and then exit your routine. When the result is coming,
you get an event triggered (OnRequestDone in the http case). Just like you
put the code to handle the click on a button in the OnClick event handler,
you put the code to process the request result in the OnRequestDone event
handler.

To correctly develop an application using the async, event driven paradigm,
you'll see that a finite state machine is a very useful pattern (See
http://en.wikipedia.org/wiki/Finite-state_machine as a starting point). To
make the story short, applied to Delphi, you define an enumerated type with
all the states of your application and then use a variable to hold the
current state. Once an event occurs, such as a http get request done, you
use that state variable to know what to do you the result and to determine
what will be the next state.

Of course, it is better to split your whole application in sub-problems,
each one with his own state machine. This is exactly what ICS components
are: state machines applied to specific internet protocols such as the http
protocol you use.

Hoping this helps.
-- 
francois.pie...@overbyte.be
Embarcadero MVP
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


[twsocket] Original way of iterating thru all the bits in an integer

2013-01-05 Thread François Piette
Hi !

 

I wrote an article about an original way of iterating thru all the bits of
an integer.

This is the kind of fancy code one could write using recent version of
Delphi. I would like to apply this kind of code in ICS, but if I do, it
won’t work anymore with the old D7.

 

The final code looks like this:

 

var
  OneBit : Boolean;
begin
  for OneBit in TBitIterator.Create(1234) do
Write(Ord(OneBit));
end;

 

You can read the article at
http://francois-piette.blogspot.be/2013/01/original-method-to-iterate-bits-w
ithin.html

 

 

-- 

francois.pie...@overbyte.be

Embarcadero MVP

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] Original way of iterating thru all the bits in an integer

2013-01-05 Thread François Piette
 I was just wondering, what would be a practical application of this
routine?  

As you probably don't know, I'm doing a lot of process control with Delphi.
And I frequently have to process bit collections.

  wouldn't it be more efficient to just shift the value to the left
directly without the abstraction of the enumerator?

Yes, that's what I said in the article. Most abstractions, if not all are
always slower than specially crafted code. However frequently efficiency is
not the most interesting factor: ease of write and readability of code tend
to be more important than speed. Usually, speed isn't an issue when you have
an i7 processor at 2GHz as it is when you have a 8 bits microcontroller
running at 1MHz :-)

And as I said in the article, this code has the advantage of being very
simple and help people learn what they can do with an enumerator and how
they can use it in their own application.

http://francois-piette.blogspot.be/2013/01/original-method-to-iterate-bits-w
ithin.html


--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Changing port on ThtmlSmtpCli

2013-01-04 Thread François Piette
 for quite a few years I have been using an application I wrote using the
THtmlSmtpCli 
 component using the default port 'smtp'. The problem I am encountering now
is that 
 my internet provider has decided to block port 25 in order to avoid spam.

My provider (Belgacom) is doing the same, but is providing a webpage that
allows you to reactivate the blocked ports.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
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


[twsocket] Writing a TIntegerList property with his property editor and enumerator

2012-12-30 Thread François Piette
Hi !

 

This subject could be considered out of topic here although it might be
applied to ICS as well. I have not applied such coding to ICS because
currently ICS has to support old Delphi compilers which lacks the required
syntax.

 

I wrote a blog article about writing a class to implement a list of integers
suitable as a component property (TListInteger isn't suitable for such
use) having his own property editor. This TIntegerList merely looks like
TStringList but has integers instead of strings. Using the object inspector,
you can edit the list of integers.

Link:
http://francois-piette.blogspot.com/2012/12/tintegerlist-property-and-proper
ty.html

 

I wrote a second article explaining how to add an enumerator or iterator to
TIntegerList class. Having an enumerator allows you to use the for..in
syntax to iterate thru the list.

Link:
http://francois-piette.blogspot.com/2012/12/writing-iterator-for-container.h
tml

 

Happy New Year!

-- 

Francois PIETTE

Embarcadero MVP

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] MessageLoop in a Thread

2012-12-18 Thread François Piette
 How can i use MessageLoop with HTTPCLI SSL in a Thread?
I use this now which does do the request but returns nothing..
  repeat
Sleep(1000)
HTTPCliSSL.MessagePump;

  until FRequestCompleted;

You should rewrite your code using pure asynchronous operation.
You should ask yourself why you need a thread.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] IcsWndControl

2012-12-14 Thread François Piette
 First of all, I would like to congratulate the ICS team for the wonderful
job in creating a 
 way to share windows handles for processing messages.
 I´m now extensively using this mechanism in all our application.

Thanks !

  One question though, why is the default limit of 100 messages registered
per handle? 
 I know that I can specify a different value for it but why is the default
100? 
 What are the consequences if I increase this value to 1000 or even 1? 
 This way I could use even less handles for the whole system, but what are
the drawbacks?

There is not rule. When I wrote the code, I've done some testing to see the
behavior with TWSocket. I selected 100 messages as a result of this informal
testing. Actually the best number is application dependent. The more message
you have, the more work is to be done by a single thread. But there could be
a lot of not frequently used messages and/or a small number of messages used
at a high rate. I cannot advice for a value. Check the behavior of your
application...

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Check Proxy with ICS

2012-12-12 Thread François Piette
 How can this be done? For example checking 100 proxy's at the same time
like with PHP curl_multi.
 Are there any open source projects based on ICS avaliable so I can have a
look :)

There are a lot of samples included with ICS right in the distribution. Did
you had a look at it ?
Hint: Look at OverbyteIcsHttpAsy.dproj

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Built with/Powered by logos

2012-12-08 Thread François Piette
Hi !

You should use the Powered by ICS logo:
http://www.overbyte.be/graphix/logos/powered_by_ics.gif
Make it a link to my website.

Thanks.
Francois



-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la
part de Raymond Kennington
Envoyé : samedi 8 décembre 2012 17:04
À : twsocket@elists.org
Objet : [twsocket] Built with/Powered by logos

Hi.

There are 3 logos on the Overbyte main page:
 Overbyte
 ICS
 Internet
   Component
Suite

I seek permission to use these in my AboutBox in my application as one of
the Development Tools.

May I, or what do you prefer me to use to reference your company and the
products used in my application?

Thanks.

Raymond
--
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] DTD problem in THttpCli POST

2012-12-04 Thread François Piette
 I've tried to extract the code from my component package and it has been 
 well executed (the same code executed in the project).
 What's the problem in your opinion ?

You have changed something else. Having a component out of a package doesn't
change his working. The same code is executed. So if it work now, then you
have changed something else.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
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] DTD problem in THttpCli POST

2012-12-03 Thread François Piette
 I use a THttpCli to communicate with a XML-RPC server.
 I have a problem when POST command is called.
 The webserver respond the error below : 

DTD interdite.
Ligne: 1
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML

 However as you can see I don't specify any DTD in THttpCli initialization
:

The problem could be that the server requires a DTD, taking your missing DTD
as an empty once, and thus and invalid one.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
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] Support for PHP and CGI

2012-12-02 Thread François Piette
 I have to write a local webserver, which demonstrates to users the effect
of their html and 
 php scripts (i.e. something like a desktop content management system).
 I'm using Delphi XE2 and Windows 7. Is it possible to integrate CGI/PHP in
any of the 
 ICS components? Is there a demo for this purpose?

Look at Overbyte website, UserMade page, there is a very old sample
program ICS WebInterface.zip by Sven Schmidts  giving THttpSrv programmers
a fast and easy interface to support CGI/WinCGI/ISAPI. You can probably
adapt this code to use the CGI version of your favorite PHP engine.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
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] FTP Client - Large files

2012-11-24 Thread François Piette
 As I said in a previous e-mail. I am testing with 3 FTP sites. It appear
only one of them has this problem.

This probably means the problem is at the server side.
Please try with another FTP client, for example windows own command line FTP
client. Use the same file and do that from the same computer, using same
mode (binary/text, active/passive).
Also try with another file just in case it depends on the file content.


-- 
francois.pie...@overbyte.be
Embarcadero MVP
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] problem to install old ICS version

2012-11-17 Thread François Piette
This is my problem : I have just been given an old Delphi 4 application,
which needs to be modified. 
This program was written using ICS components ten years ago. I have a
Delphi 4, and also the 
components as they existed when the progran was created. So I should be
able to open then 
 program, and modify it. But when I try to install the ICS package in
Delphi 4, I get an arror 
message telling (in french) : Ne peut charger le paquet 'ICSdel40'. Il
contient l'unité 'system', qui 
 est également contenu dans le paquet Vcl40 

Delphi 4 is very old and I don't remember exactly how it worked then. But
anyway, it looks like ICS package doesn't requires VCL packages which for
him to include units normaly found in those packages. You should probably
just add VCL40 to the requires section in ICS package and rebuild it
completely. Then it will work.


-- 
francois.pie...@overbyte.be
Embarcadero MVP
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] ICS FTP Client Strange Effect

2012-11-14 Thread François Piette
 I vote for Binary as the default mode.

Unfortunately, the standard says text mode has to be the default.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
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] ICS WebServer Demo

2012-11-14 Thread François Piette
 The problem was that the World Wide Web Publishing Services was running.

You should have got the error 10048 Socket already in use. You reported
error 10013. Strange.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
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] ICS WebServer Demo

2012-11-13 Thread François Piette
 Just started to look at the Web Server demo. When I run it I get 10013
Bind error.
 Any clues as to how to proceed?

Error 10013 mean you have no access to some file.
Check the OS files hosts, protocol and services (no extension) which shoud
be in C:\Windows\System32\drivers\etc
Some virus corrupt those files or make the OS think they are at another
location.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
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] HTML...HttpClient...

2012-10-27 Thread François Piette
 This code:
 HTML

It looks like you posted in the wrong place ! This code is not related to
ICS use.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWsocket and EStackOverflow

2012-10-25 Thread François Piette
 I already try, after reading the Wiki, the Shutdown(1) procedure, anyway, the 
 result is the same. I try close, shutdown, abort ... etc.

Make a stripped down version of your application and mail it to me. Be sure to 
include a complete project with only the code required to reproduce the error. 
Remove everything else (no exe of course). I won't look at it if I doesn't 
compile immediately!

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Plans for ICS and iOS?

2012-10-25 Thread François Piette
  I would take a look as lazarus 1.x could handle ICS no problem.

You are welcome to try ICS with lazarus and make the changes required to
support Lazarus. If you do, please be sure to start with ICS-V8, the latest
version and take the source code directly out of the SVN repository.


--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWsocket and EStackOverflow

2012-10-24 Thread François Piette
I don't see anything obviously wrong there.
Just to be sure, please test one of the sample programs (For example 
OverbyteIcsClient7.dproj which is close to your own test) delivered with ICS to 
see if they works OK. If not, then you have somehow corrupted your ICS 
installation.


-- 
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be


-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la 
part de LeNif
Envoyé : mercredi 24 octobre 2012 07:55
À : twsocket
Objet : Re: [twsocket] TWsocket and EStackOverflow

Hello,

When I say wait, it 's because, I look at my debug memo and I don't click on 
connect before the event OnsessionClosed is fired, I manually wait with my eyes 
! ;) Idon't use the wait() procedure !

I make a copy paste of my source code, as you can see, it's really simple: (I 
just suppress each event code where there is just a debug lines added to the 
memo to see if event is fired)

procedure TForm1.Button2Click(Sender: TObject); begin // start or stop  if 
TCPCLient.State = wsClosed then
   TCPClient.Connect
 else
   TCPClient.close;
end;

procedure TForm1.Button3Click(Sender: TObject); begin
  TCPClient.SendStr(CHR($21));
end;

procedure TForm1.Button4Click(Sender: TObject); begin
  TCPClient.SendStr(CHR($55));
end;

procedure TForm1.dvLed1Change(Sender: TObject); begin // event fired by a led 
displaying connection status
  If dvLed1.LedOn then
Button2.Caption := 'Disconnect'
  else Button2.Caption := 'Connect'
end;

procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin
  TCPClient.Close;
end;

Procedure TForm1.LogIt(AMessage: string); begin
  meLog.Lines.Add(Amessage);
end;

procedure TForm1.TCPClientDataAvailable(Sender: TObject; ErrCode: Word); var
Buffer, hexBuf : array [0..1023] of char;
Len: Integer;
Src: TSockAddrIn;
SrcLen : Integer;
hexstr: String;
begin
  LogIt('DataAvalaible: Error='+IntToStr(ErrCode));
  SrcLen := SizeOf(Src);
  Len:= TCPClient.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen);
  if Len = 0 then
  begin
LogIt('Data from '+StrPas(inet_ntoa(Src.sin_addr))+' - data : ' + 
(strpas(Buffer)));
  end;
end;

procedure TForm1.TCPClientSessionClosed(Sender: TObject; ErrCode: Word); begin
  logIt('SessionClosed: Error='+IntToStr(ErrCode));
  dvLed1.LedOn := False;
end;

procedure TForm1.TCPClientSessionConnected(Sender: TObject; ErrCode: Word); 
begin
  logIt('SessionConnected: Error='+IntToStr(ErrCode));
  dvLed1.LedOn := True;
end;





LeNif

From: François Piette
Date: 2012-10-23 18:39
To: 'ICS support mailing'
Subject: Re: [twsocket] TWsocket and EStackOverflow
 Hello, thanks but I already wait for OnsessionClosed befor restarting. 

Wait ? Does this means you don't use the events ?

 I post a capture with log info here ... 
 http://imageshack.us/photo/my-images/844/screenshot47a.png/

Not very interesting...
If you have a stack overflow, you probably have a function calling itself 
recursively. Your wait is probably the culprit but in fact, I don't know 
because I have no idea about your code. Did you have a look at the sample 
programs ?

--
francois.pie...@overbyte.be
Embarcadero MVP
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
--
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 and EStackOverflow

2012-10-24 Thread François Piette
You should try using Shutdown instead of closing your end. Shutdown ask the 
other party to close the connection and you receive the sessionclosed event 
when he accept. If you don't receive sessionclosed event, then you may call 
Abort.

Shutdown is a graceful close (one partu ask the other to break the connection), 
Abort is an immediate termination of the connection whatever the other party 
want.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be



-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la 
part de LeNif
Envoyé : mercredi 24 octobre 2012 20:29
À : twsocket
Objet : Re: [twsocket] TWsocket and EStackOverflow

Hello,

When I use Wireshark to snif communication, I see that exchange with the device 
continue, even after the close  that's really strange ...

Maybe the problem is with the device and not with my socket ...

thanks




LeNif

From: François Piette
Date: 2012-10-24 20:14
To: 'ICS support mailing'
Subject: Re: [twsocket] TWsocket and EStackOverflow I don't see anything 
obviously wrong there.
Just to be sure, please test one of the sample programs (For example 
OverbyteIcsClient7.dproj which is close to your own test) delivered with ICS to 
see if they works OK. If not, then you have somehow corrupted your ICS 
installation.


--
francois.pie...@overbyte.be
Embarcadero MVP
http://www.overbyte.be


-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la 
part de LeNif
Envoyé : mercredi 24 octobre 2012 07:55
À : twsocket
Objet : Re: [twsocket] TWsocket and EStackOverflow

Hello,

When I say wait, it 's because, I look at my debug memo and I don't click on 
connect before the event OnsessionClosed is fired, I manually wait with my eyes 
! ;) Idon't use the wait() procedure !

I make a copy paste of my source code, as you can see, it's really simple: (I 
just suppress each event code where there is just a debug lines added to the 
memo to see if event is fired)

procedure TForm1.Button2Click(Sender: TObject); begin // start or stop  if 
TCPCLient.State = wsClosed then
   TCPClient.Connect
 else
   TCPClient.close;
end;

procedure TForm1.Button3Click(Sender: TObject); begin
  TCPClient.SendStr(CHR($21));
end;

procedure TForm1.Button4Click(Sender: TObject); begin
  TCPClient.SendStr(CHR($55));
end;

procedure TForm1.dvLed1Change(Sender: TObject); begin // event fired by a led 
displaying connection status
  If dvLed1.LedOn then
Button2.Caption := 'Disconnect'
  else Button2.Caption := 'Connect'
end;

procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin
  TCPClient.Close;
end;

Procedure TForm1.LogIt(AMessage: string); begin
  meLog.Lines.Add(Amessage);
end;

procedure TForm1.TCPClientDataAvailable(Sender: TObject; ErrCode: Word); var
Buffer, hexBuf : array [0..1023] of char;
Len: Integer;
Src: TSockAddrIn;
SrcLen : Integer;
hexstr: String;
begin
  LogIt('DataAvalaible: Error='+IntToStr(ErrCode));
  SrcLen := SizeOf(Src);
  Len:= TCPClient.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen);
  if Len = 0 then
  begin
LogIt('Data from '+StrPas(inet_ntoa(Src.sin_addr))+' - data : ' + 
(strpas(Buffer)));
  end;
end;

procedure TForm1.TCPClientSessionClosed(Sender: TObject; ErrCode: Word); begin
  logIt('SessionClosed: Error='+IntToStr(ErrCode));
  dvLed1.LedOn := False;
end;

procedure TForm1.TCPClientSessionConnected(Sender: TObject; ErrCode: Word); 
begin
  logIt('SessionConnected: Error='+IntToStr(ErrCode));
  dvLed1.LedOn := True;
end;





LeNif

From: François Piette
Date: 2012-10-23 18:39
To: 'ICS support mailing'
Subject: Re: [twsocket] TWsocket and EStackOverflow
 Hello, thanks but I already wait for OnsessionClosed befor restarting. 

Wait ? Does this means you don't use the events ?

 I post a capture with log info here ... 
 http://imageshack.us/photo/my-images/844/screenshot47a.png/

Not very interesting...
If you have a stack overflow, you probably have a function calling itself 
recursively. Your wait is probably the culprit but in fact, I don't know 
because I have no idea about your code. Did you have a look at the sample 
programs ?

--
francois.pie...@overbyte.be
Embarcadero MVP
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
--
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
--
To unsubscribe or change your settings

Re: [twsocket] TWsocket and EStackOverflow

2012-10-23 Thread François Piette
 Hello, thanks but I already wait for OnsessionClosed befor restarting. 

Wait ? Does this means you don't use the events ?

 I post a capture with log info here ... 
 http://imageshack.us/photo/my-images/844/screenshot47a.png/

Not very interesting...
If you have a stack overflow, you probably have a function calling itself
recursively. Your wait is probably the culprit but in fact, I don't know
because I have no idea about your code. Did you have a look at the sample
programs ?

-- 
francois.pie...@overbyte.be
Embarcadero MVP
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] Ftp component not ready

2012-10-21 Thread François Piette
 I'm running into a Ftp component not ready error. 
 What is the proper way to check for the component being ready in c++?

Use the OnRequestDone event.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
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 Digest, Vol 495, Issue 3

2012-10-21 Thread François Piette
 I can get the attachment file on the IPhone, but as a side effect I get
all 
 embedded images as attachments too at the bootom of the message.

Are you able to send such as message using a mail client such as Outlook ?
If yes, just have a look at how that message is formatted and change the
component to have the same formatting, and of course report the solution
here.

-- 
francois.pie...@overbyte.be
Embarcadero MVP
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] ICS support for RAD Studio XE3

2012-09-08 Thread François Piette
 Support for Delphi and C++ Builder XE3 is now available in ICS V8 beta
available from: 
 http://wiki.overbyte.be/wiki/index.php/ICS_Download
 ICS V8 includes support for IPv6 and the FireMonkey FMX framework for
Windows and Mac OS X.  

I would like to thanks Angus Robertson and Arno Garrels for their huge
support for making ICS V8. Without both of them, ICS-V8 would probably not
be there !

Great work and again, thanks.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] TR: CreateWindowEx failed error in TWSocket

2012-08-17 Thread François Piette


-Message d'origine-
De : François Piette [mailto:francois.pie...@overbyte.be] 
Envoyé : vendredi 17 août 2012 21:32
À : 'dushy...@intellectsoftwares.com'
Objet : RE: CreateWindowEx failed error in TWSocket

By default, Windows is limited to 1 window handles globally. You
probably hit that limit.
I don't know which ICS version you are using but I suspect you are using an
old one because ICS-V7 is sharing the same window (a hidden window used only
for his message queue) and you can have much much more connections without
tweaking Windows parameters.

It is also possible that you don't free the socket after use and after
sometimes you have consumed all Windows resources. Use madExcept4 and
FastMM4 to help you find the leaks, if any.

Please use the support mailing list to further discuss this topic. See
support link at my website for details.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare The author of the
freeware Internet Component Suite (ICS) http://www.overbyte.be




-Message d'origine-
Envoyé : vendredi 17 août 2012 16:13
Objet : CreateWindowEx failed error in TWSocket

Hello Sir,

I have used your ICS-ver6 -TWSocketServer component and I am very satisfied
with the performance of the socket.

I use TWSocketServer component for my server application which ideally has
around 1000 to 1500 Active client connections, and around 10,000 total
connections in a day.

I have created a .net library(dll) of your component from Delphi and using
the same in c# .Net 2010. Lately i have started facing the problem of
CreateWindowEx failed. After this exception, no new connections to the
server are possible. The entire machine goes into a hung state and it has to
be restarted. Sample exception log is as follows for your reference.


^^---^^
Source  : OverByteIcs
Method  : AllocateHWnd
Date: 2:52:43 PM
Time: 8/17/2012
Computer: isp1server1
Error   : CreateWindowEx failed
Stack Trace : at OverbyteIcsWndControl.TIcsWndHandler.AllocateHWnd()
at OverbyteIcsWndControl.TIcsWndControl.AllocateHWnd()
at OverbyteIcsWSocket.TCustomWSocket.AllocateSocketHWnd()
at OverbyteIcsWSocket.TCustomWSocket..ctor()
at OverbyteIcsWSocket.TCustomSocksWSocket..ctor()
at OverbyteIcsWSocketS.TWSocketClient..ctor()
at OverbyteIcsWSocketS.TWSocketClient.@MetaTWSocketClient.@Create()
at
OverbyteIcsWSocketS.TCustomWSocketServer.TriggerSessionAvailable(UInt16
Error)
at OverbyteIcsWSocket.TCustomWSocket.Do_FD_ACCEPT(TMessage msg)
at OverbyteIcsWSocket.TCustomWSocket.WMASyncSelect(TMessage msg)
at OverbyteIcsWSocket.TCustomWSocket.WndProc(TMessage MsgRec)
^^---^^


I have noticed that this problem occurs only on the server where no.  
of total connections are in the range of 9,000 to 10,000. The same server
applications runs on other servers too, with an approximate load of 600-700
active connections without any problem.

I would be grateful to you if you can assist me on the above mentioned
problem.

Thanking You in anticipation.

--
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] hello, all, problems of THttpCli in thread

2012-08-13 Thread François Piette
   It seems that I faced a problem of THttpCli component used in thread.

You must create the component from the execute method, not the constructor
and your thread MUST have a message pump.
I suggest you start with one of the multithreaded samples delivered with
ICS.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Wiki issue

2012-08-01 Thread François Piette
Those are created automaticaly by some malware in the hope of modifying
pages but since Overbyte wiki requires permission, nothing bad ever occured.

Thanks for worrying.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be




-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la
part de Markus Humm
Envoyé : mercredi 1 août 2012 18:40
À : ICS support mailing
Objet : [twsocket] Wiki issue

Hello,

I've looked something up in the wiki today and routinely (don't do much ICS
related work currently so routinely is months...) I look at the list of
latest changes to see how wiki progresses. (Has anybody not yet ontributed?
;-) )

Now I saw that in the last few days   500 bogus user accounts with
seemingly random names have been created. Anybody noticed this already?
Does this do any harm? Are there any counter measures? (e.g. a log with the
IP of those creators and if it's the same IP maybe it can be traced and at
least a provide get informed)

This is for this time, but I'll most probably return with another thread
about TSmtpCli tonight...

Greetings

Markus
--
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] Wiki issue

2012-08-01 Thread François Piette
I searched the web with no luck to find a SQL statement to delete fake user
from the database.
If anyone has some resource to share...

The difficulty is to delete only fake user and not the real users and
without compromising database [referential] integrity.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be




-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la
part de Lester Clayton
Envoyé : mercredi 1 août 2012 20:57
À : ICS support mailing
Objet : Re: [twsocket] Wiki issue

This has been noticed before.  Bogus accounts get created all the time, but
you have to have permission to actually contribute.  Those bogus accounts
therefore do not harm the system, apart from take up database space.

Francois (and I believe some other senior developers) have the power to
grant you write rights if you would like to contribute to the Wiki :)

Lester

On 01/08/2012 18:40, Markus Humm wrote:
 Hello,

 I've looked something up in the wiki today and routinely (don't do 
 much ICS related work currently so routinely is months...) I look at 
 the list of latest changes to see how wiki progresses. (Has anybody 
 not yet ontributed? ;-) )

 Now I saw that in the last few days  500 bogus user accounts with 
 seemingly random names have been created. Anybody noticed this already?
 Does this do any harm? Are there any counter measures? (e.g. a log 
 with the IP of those creators and if it's the same IP maybe it can be 
 traced and at least a provide get informed)

 This is for this time, but I'll most probably return with another 
 thread about TSmtpCli tonight...

 Greetings

 Markus
 --
 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

--
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] Ipv6

2012-06-05 Thread François Piette
 what is the status of IPv6 with ICS ?

Already working, thanks to Arno !
See SVN repository branch icsipv6.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Request for making TCustomSslWSocket::AssignDefaultValues public

2012-05-22 Thread François Piette
 We need to call this function from return-to-client-object-pool routine to
make HSocket = -1. 
 I cannot use inheritence as this is for THttpCli::CtrlSocket and I cannot
override the CtrlSocket 
 without re-writing the THttpCli unit from scratch.

Maybe I misunderstood...
You can use inheritance to override THttpCli.CreateSocket and in that method
create any derived TWSocket class.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Bug with ICS and PING?

2012-05-07 Thread François Piette
If however you are trying to ping a device on the local subnet which is not
there
 (DOS PING shows Destination host unreachable.) , the application returns
1, 0 
and then the Reply.RTT shows the correct time 
it took to fail.   It seems to me that this is a bug because the flag 
 returned from ping indicates a success, and the ErrorCode also indicates
no errors.

The success means the ICMP request packet has been sent.

--
François Piette




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


Re: [twsocket] A small issue with socket reconnection [HELP]

2012-05-01 Thread François Piette
 I have a simple chat system were users can re-login and change there
usernames however 
 ever seen i updated my delphi to xe 2 update 4 my relogin feature has
stopped working.

 after debugging the code I am lost to find out as to why as there seams to
be no problems 
 with my code username is cleared out of socket so on but soon as i go to
reconnect to 
 server i will get connected then disconnected right away but if i close my
app and login
 as normal it works fine.

There is nothing obvious I can think of which could cause this trouble as
far as TWSocket is concerned. Of course I can't say anything about your own
code which I never saw.

As a first step, you should probably download the latest ICS daily snapshot
and recompile your application.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] how to reject same ip once already connected?

2012-04-14 Thread François Piette
 I been trying to make my server reject ip’s that are already connected to 
 system 
for i := 0 to (SocketServer.ClientCount -1) do begin 
  if (SocketServer.Client[i].GetPeerAddr = rSocket.GetPeerAddr) AND 
 (SocketServer.Client[i].Handle  rSocket.Handle) then begin 
// send message to client Exit; 
  end; 
 end;
 but don't seam to be able to get it working can sum one help please??

You should tell what is not working. Your code is partial, but at first looks 
OK.
You should be aware of proxies and NAT routers. If two computer are behind the 
same proxy or NAT router, they will have the same IP.


--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] How to install Firemonkey beta pack for XE2

2012-04-09 Thread François Piette
Are there any special steps to follow for installing the beta ICS package
(from svn) for 
Firemonkey? Tried to install it separately, and it gives an error

The procedure entry point @Overbyteicslibrary@initialization$qqrv could
not be located 
in the dynamic link library OverbyteIcsDXe2Run.bpl

Are you sure you have recompiled both runtime and design time package ?
Isn't any mess in the search path so that old and new ICS are messed ?

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] WiFi Access List?

2012-03-31 Thread François Piette
 Do anyone know of a quick way to grab just visible SSID's 

AFAIK this is out of ICS scope. You should probably ask this in the general
Delphi mailing list (del...@elists.org which as you can see is served by the
same mailing list server).

 And while I'm at it

It is better to state your opinion by answering the corresponding message
because you answer will be completely lost when the results are examined. As
for any topic, it is always preferable to use the proper subject for each
message. Many people only read the message content if the subject match
their interest.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Should next ICS version support anything before Delphi XE ?

2012-03-28 Thread François Piette
Hi !

 

I’m planning the next ICS version…

Being unable to use any features added to Delphi in the last 10 years is
very restricted.  Maybe we need to cease support for old Delphi versions ?
Of course ICS V5 and V7 will remains available however, the only changes
will be bug fixes.

 

What do you think ? Please keep your answer as short as possible, I just
want to have an idea about how many of you are still using an old Delphi
version.

 

--

francois.pie...@overbyte.be

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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Wiki hacked?

2012-03-25 Thread François Piette
 OK, I searched (briefly) for some mal content via FTP with no success.

Good news !

 Just wonder why those get logged when you have to send a request 
 to Francois first in order to get an account?

Actually, anyone can create an account, but this account is read only. So
maybe some robot created an account but was blocked because to write
something they would have to ask me for permission.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Which version of ICS should I use for Delphi XE2andFiremonkey on windows

2012-03-16 Thread François Piette
 Would the FireMonkey beta be the next “stable release” of ICS ?

 I hope so, at least that is my plan, don't know what the rest of the team 
 thinks? 

+1

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] HttpCli, state Ready ?

2012-03-06 Thread François Piette
 Can I use the property Http.State=Ready for consider that the http
component 
 is fully available and its last download is finished?

No. use the events.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Design principles of WebSockets server for ICS

2012-03-05 Thread François Piette
By the way, I don't really understand the real world use case for such 
WebSockets in the context of a IC/Delphi/WebServer application. 
Unless you have to support and existing client application, it is IMO 
not very interesting. Maybe I'm wrong.

 The websockets supersede the old AJAX approach with requesting each 
 portion of data by separate http-request. WebSockets allow you to do the
 same without overheads on HTTP-headers, which may be very large in 
 comparison with your data, if you're exchanging with small data elements.

OK, I understand. You want to support existing client. Sounds good to me.

To go back to your initial design question, it is probably better to start
with the THttpAppSrv component which is by far the most advanced one to
build dynamic web application backend.

If you don't know that component yet, have a look at the [unfinished]
tutorial : http://wiki.overbyte.be/wiki/index.php/TutWebAppServer

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Design principles of WebSockets server for ICS

2012-03-04 Thread François Piette
Hello Stan,

As I understand, you are trying to - or you already have - implement
RFC6455, server side (http://tools.ietf.org/rfc/rfc6455.txt).
Is that correct ?

There are several ways to implement that using ICS. I don't know the best
one since I have not read RFC6455 in details. Candidates are TWSocket,
TWSocketServer, THttpServer and THttpAppSrv. Gave the candidates in order of
inheritance. At first glance, the highest level is the best because you will
less reinvent existing code.

By the way, I don't really understand the real world use case for such
WebSockets in the context of a IC/Delphi/WebServer application. Unless you
have to support and existing client application, it is IMO not very
interesting. Maybe I'm wrong.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be




-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la
part de Stan
Envoyé : dimanche 4 mars 2012 16:09
À : ICS support mailing
Objet : [twsocket] Design principles of WebSockets server for ICS

Hi Everybody,

I have a WebSockets server based on ICS. It is currently implemented as a
tcp-server (TWSocketServer without any modifications) with custom descendant
of TWSocketClient, which provides all necessary functionality for WebSockets
handshaking and data exchange.

We could use it in ICS projects right away, but I'm not sure if this is a
proper approach.

Lets consider an ordinary use-case for websockets: a client is a browser's
built-in websocket, and the socket is instantiated by a web-page code.
The web-page itself is normally served by a web-server located on the same
host which is an endpoint of the websocket connection. So, standard http-
port is used by the web-server, and a dedicated tcp-server (for websockets)
is required to listen at a non-standard port, which may be not allowed by
some firewalls. On the other hand, we can suppose that the web-server is an
ICS-based web-server. So, it is feasible to combine web-server and
websockets-server in a single component, serving websockets on standard
http-port. I think, this is only possible if the current THttpServer
component (actually, meaning with the THttpConnection component) is extended
and reworked. That is deriving new components from the existing ones will
require overriding of most important virtual methods and copy-pasting much
of http-related code into the new methods, what is not good. The reason for
this is the need to interlace little yet distinctive websocket code
fragments with existing code. In other words, it would be necessary anyway
to transform such methods as THttpConnection.ConnectionDataAvailable into a
highly templatized methods splitted into several new virtual stages/branches
each.

Are there some other design principles for implementing this?

I'd be glad to hear your opinions, considerations on which variant is the
best, and suggestions on implementation.

If the general consesus is that current design is sufficient for the moment,
I'll send the sources to Francois.

Best wishes,
Stan

--
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] tcp hole punching

2012-03-03 Thread François Piette
 Probably Universal Plug and Play (UPnP)is what you are looking for.

How reliable is that ?

What do you mean ? 
Are you asking if it works ? The answer is yes.
Are you asking it is always available ? The answer is no. It is disabled on
firewalls or routers where security is really controlled. Most home user
have it turn on because they don't even know what it is.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] tcp hole punching

2012-03-03 Thread François Piette
 Do you know how TCP hole punching works ?

http://www.brynosaurus.com/pub/net/p2pnat/

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] tcp hole punching

2012-03-02 Thread François Piette
Now I need to establisch a P2P connection that can pass firewalls.
Does anyone knows how it should be done ?

Could you more explicit about the situation ?
Where is the server, where is the client(s), where is the firewall ? Is each
client also a server or do they work thru an intermediate server ? Do you
have control over the infrastructure (Firewall config for example) ?

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] tcp hole punching

2012-03-02 Thread François Piette
 Now I need to establisch a P2P connection that can pass firewalls.
Does anyone knows how it should be done ?

 Could you more explicit about the situation ?

 I thougth that the whole idea of hole punching is a way to let NAT and
firewalls thinck 
 that there is no server that a gateway is needed to exchange connection
date between the 2 peers.
 Since these are adhoc connections, there is no control over firewalls.
 I need something like Skype does

Probably Universal Plug and Play (UPnP)is what you are looking for.
Btw: Skype is using an intermediate server to locate users.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] best way for packet routing

2012-02-28 Thread François Piette
 Do you think that routing cicle is ok? There is a better way to do that?
 Can you give any advice about that?

How do you solve the issue which can happen if a client is not receiving
data fast enough ? The sending socket will buffer data (It is asynchronous
on send as well) and all memory could be consumed if you don't kill client
which do not receive data, or at least delete some data (the oldest or the
newest).

Also, with your system, data is duplicated as much as you have clients. This
is a waste of memory and will not scale up nicely.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] OFF: string issues while porting WebSockets server to BDS 2010

2012-02-28 Thread François Piette
Be sure to use latest ICS which has been ported to unicode enabled Delphi
versions such as D2010.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be




-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la
part de Stan
Envoyé : mardi 28 février 2012 21:01
À : ICS support mailing
Objet : Re: [twsocket] OFF: string issues while porting WebSockets server to
BDS 2010

Apologies for the disturbance, I've found the solution - AnsiChar.
Now all is working fine.

- Original Message -
From: Stan
To: ICS support mailing
Sent: Tuesday, February 28, 2012 10:43 PM
Subject: OFF: string issues while porting WebSockets server to BDS 2010


Hi,

I have a working WebSockets server for ICS, which I plan to share.
It is implemented initially in Delphi 7. Now I try to port it to BDS2010 and
have some issues with strings.

First, I replaced all 'string's with 'AnsiString's, and this seems working
as expected. But Chr function produces a problem. If I have an AnsiString
str, and try to call str := Chr(b), where b is Byte with value 129, I get
the symbol '?', which should normally be another non-standard so to speak
character.

So the question is, how to use Chr in BDS without any smart
interferences, or how can I pack bytes in a AnsiString without using Chr?

Thanks in advance,
Stan
--
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] best way for packet routing

2012-02-27 Thread François Piette
 For this I configured each client to send about 1000 packets per second of
4 bytes (about 32Kbps).

Your bps computation is wrong. You send 4 data bytes, the actual packets on
the network are much larger (something like 10 times) ! Have a lokk there:
http://sd.wareonearth.com/~phil/net/overhead/

You should avoid transmitting such small packet. It is better to aggregate
small packets into larger ones.

   fSS.Client [i]. Send (fRxData, lSize)

Add a try/except block around that line.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Download manager

2012-02-25 Thread François Piette
 I am working on a download manager, and using the HTTPMultipartdownloader
component.
 For now I have 5 different HTTPMultipartdownloader components on my form,
but I think 
 I should be able to do it with only 1. like HTTPMultipartdownloader[xx]  ?

It depends on the requirements for your application. A few questions:
1) Do you want to download several files simultaneously or sequentially ?
2) To download one single file, do you want to download it normally or use
the several simultaneous connection to download several parts of the same
file at the same time ?

Question 1 will tell you if you need one (sequential download) or many
(parallel download) components.
Question 2 will tell you is you need the THttpCli component (normal
download) or the MultipartHTTP component (sevral parts of the same file
simultaneously.

Actually the multipart component is using several THttpCli component to
download several parts of the same file at the same time using the HTTP
range option. This is useful when you have a host server with a simple
bandwidth limitation. Using the multipart component, you'll go much faster.
If the host server has an intelligent bandwidth limiter, this won't change
anything and if it has no bandwidth limiter, you'll actually slow down the
download.

Also don't forget that if you download 10 files simultaneously, each one
with 10 simultaneous parts, you'll end up with ONE HUNDRED simultaneous
connections. Thinks about the required power on your client computer and
network infrastructure.
By the way, when using appropriate hardware and OS, ICS is able to handle
several THOUSANDS simultaneous connections. This won't work with all
configurations because of OS or hardware limitation.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TsmtpCli with SSL

2012-02-21 Thread François Piette
 Does the TSmtpCli support ports other than 25? 

No, only TSslSmtpCli supports SSL/TLS.
Including SSL/TLS connections or method/command STARTTLS on any port number
you want.

Just to clarify Arno's answer:  If you need to send Emails with SMTP over
SSL/TLS link, you need the SSL enabled version of the well known TSmtpCli
component. This component is names TSslSmtpCli. The usage is almost the same
as TSmtpCli with of course added properties, methods and events to handle
SSL/TLS operation. TSslSmtpCli is included in the standard ICS distribution
of ICS.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] how to stream images via client and server socket?

2012-02-16 Thread François Piette
 Am looking for way to stream image data with client /server sockets so
that 
 i can broadcast same image to all connected clients as anyone got a
working 
 demo or can help me with this ?

There is an old pair of demos in ICS: a client and a server for a basic chat
system. Of course this demo is about sending text. But as far as socket is
concerned, it makes no difference if data is text or image.


--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Problems with TWSocket and Skype

2012-02-06 Thread François Piette
It is likely that your problem comes from the different programming paradigm
between the two libraries. ICS is non-blocking (asynchronous) while the
other is blocking. It is possible that you don't follow the rules for
asynchronous programming and get problems... There are two very important
rules: 1) Never call directly or indirectly the message pump from one of the
component event and 2) never forget that all calls to methods - such as Send
- are merely requests and that you get control back immediately while your
request execute in the background.

If you follow the rules, everything will be OK. You can verify by yourself
that ICS components are capable of high speed communication with a huge
number of simultaneous connections, both client or server side. See the HTTP
and FTP client and server to convince yourself.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be




-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la
part de robertoschler
Envoyé : mardi 7 février 2012 05:07
À : TWSOCKET
Objet : [twsocket] Problems with TWSocket and Skype

Hello,

A couple of years ago I tried using TWSocket with Skype to send audio back
and forth between my Delphi 6 application and the Skype client.  I never
could get it to work until I switched to the Indy components.

Since then I've used ICS in several applications they have always worked
great.  Now I have another application that interfaces with Skype and again
I am having trouble trying to get TWSocket to work with Skype.

My application acts as a middleman between an external WiFi webcam device
relaying audio from its microphone to Skype's input audio port and relaying
audio from Skype's output audio port to the webcam device's speaker.  I am
using ICS on both sides now.  TWSocket works just fine with the external
WiFi webcam, however, I can't make it work with Skype.  The audio going to
Skype is frequently jamming up whereby the buffered byte count rises
quickly for short durations, enough to make the audio stream going to Skype
unusable (calling TWSocket.Send).  The socket receiving audio from Skype
receives about 11 to 20 data deliveries successfully and then just dies
(OnDataAvailable stops firing).  The connection stays open, but Skype stops
sending audio permanently.


Both sockets for the pair of connections are spawned by a listening socket.
The way you tell the Skype client to receive audio from your application is
to open a socket on a port number of your choice and Listen.  You then tell
Skype the port number you are using and Skype connects to you on that port.
The same goes for the socket you use send audio to Skype.  In both cases you
Listen and Skype connects to you on the given port.  The difference of
course being that you repeatedly handle OnDataAvailable() events on the
socket that is receiving audio from Skype, and repeatedly call Send() on the
socket that is sending audio to Skype.

I'd rather keep things ICS all around but I'm close to switching to Indy on
the Skype side.  I recently found out that Skype uses Indy for its Windows
clients.  I'm also aware that Indy uses a thread that blocks to do its work
as opposed to TWSocket which uses a message loop.

Can anyone speculate as to what about Indy's sockets are more compatible
with Skype than (at least for me) TWSocket sockets?  What could I try to
quickly fix this situation, perhaps by more closely emulating Indy's
behavior?

Thanks,
Robert
--
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] udp server and network configuration changes

2012-02-03 Thread François Piette
 There is a way to recognize networks changes like these? 

Have a look at IP Helper API:
http://msdn.microsoft.com/en-us/library/aa366329(VS.85).aspx


--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Package problems

2012-02-03 Thread François Piette
 OK, have it working now.

And the problem was

It is always better to report the solution you found for a problem you
talked in the list. This way, the next guy searching for the same problem
will also find the solution !

Thanks.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Reading e-mail

2012-01-31 Thread François Piette
 We summarize. I have to read e-mail. I read the first post and everything
is ok (they 
 are executed properly onheaderend events, onmessageend, ...
 Step to read any other message (which exists) is not getting any error
message but 
 still displays the information of the first message and events are not
executed. Why?

Are you using your own code or the demo delivered with ICS ?
If not using the demon first try with it and if it doesn't work, please
report EXACTLY the steps you are doing.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] SITE EXEC issue

2012-01-30 Thread François Piette
I have a client ftp component written using ICS and a server component also
using ICS - everything 
was grand up to about 2 weeks ago, when the client ftp was sending a SITE
EXEC progname to 
the server - now that command never even gets received (and therefore
never executes).  
 This smells of anti-virus or something but it is just the SITE EXEC that
does not work - everything else is fine.

Use a sniffer - such as the free WireShark - see if it is a client side or
server side issue. Using the sniffer, you'll see if the client correctly
send the request or not. Then we may help you debug the client or server.


--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Does a call to TWSocket.Send have to be on the same thread as the socket?

2012-01-29 Thread François Piette
 If I make a Send call to that socket, does it have to occur on the same
thread as the worker thread?  
 Or can I call it's Send method from another thread?  I looked at the
WSocket.pas code and I didn't 
 see anything that looked like it wasn't thread-safe, 

Sending data pass thru the internal buffer which is protected by a critical
section. So it should be thread safe.

 but I'm having some strange problems like 
 missing OnDataAvailable() events so I wanted to check.

This usually comes from bad handling of message pump. Check that part of
your code. Also, don't call  the message pump directly or indirectly from
one of the component event !

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TSslHTTPCli: POST with XML data to get RESOURCE on REST

2012-01-29 Thread François Piette
HERE IS A LINK FOR API http://www.kgnsoft-in.com/oauth/api0001.gif
SCREENSHOT FOR THE POST METHOD

Please provide the link to the API you are trying to implement. Just that
part is not enough.

Have you seen this : http://tools.ietf.org/html/draft-ietf-oauth-v2-23 and
this : http://tools.ietf.org/html/rfc5849 ?
Which part of the standard is the problem ?

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be




-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la
part de Iqbal Husain
Envoyé : dimanche 29 janvier 2012 17:00
À : ICS Overbyte Mailing List
Objet : [twsocket] TSslHTTPCli: POST with XML data to get RESOURCE on REST

Hi,

I am working on an OAuth API. I achieved the following using TSslHTTPCli in
combination with TSslContext:

1.   Getting Token and Secret Token.

2.   Getting Access Token and Access Secret Token.

3.   Getting Account List. {REST resource HTTP Method GET}

4.   Getting Account Balance. {REST resource HTTP Method GET}

 

In all of my above example, I put the OAuth parameters in
TSslHTTPCli.SendStream and it works fine.

 

What I am not able to do is to get REST resource with HTTP Method POST. The
documentation in the API is:

 

HERE IS A LINK FOR API http://www.kgnsoft-in.com/oauth/api0001.gif
SCREENSHOT FOR THE POST METHOD

 

 

The problem is:

I have OAuth parameters to pass the given URL with the above parameters. I
am not sure how to this. What I tried:

1.   I put the OAuth parameters in the URL and put the XML (with related
values in an ANSIString) in TSslHTTPCli.SendStream

 

The Response was ERORR: 400

 

2.   I put OAuth parameters in TSslHTTP.SendStrean and added the XML
string to Head in OnBeforeHeader event.

 

The Response was ERROR: 400

 

3.   I added these value as a field = value format and added to URL also
put in TSslHTTPCli.SendStream 

 

The Response was 415 Unsupported Media

 

 

ANY HELP WILL BE MUCH APPRICIATED.

 

Thanks

Iqbla Husain

 

 

 

 

 

--
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] Digest authentication via THttpCli?

2012-01-10 Thread François Piette
Thanks Arno.
Well done.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be



-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la
part de Arno Garrels
Envoyé : mardi 10 janvier 2012 13:41
À : ICS support mailing
Objet : Re: [twsocket] Digest authentication via THttpCli?

Paul Read wrote:
 @Paul: Does that fix the issue?
 
 Yes!  :-)

Thanks, I just checked in a fix, rev. #861
Log:
Digest Authentication - Fixed backward compatibility with RFC 2069.
- Handle more than one qop and algorithm in server challenge.

Available via SVN now or included in the next nightly snapshot ZIP.
http://wiki.overbyte.be/wiki/index.php/ICS_Download

-- 
Arno Garrels 



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

--
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] Digest authentication via THttpCli?

2012-01-08 Thread François Piette
Maybe a new component options would let the developer select the behaviour ?
Or maybe first try with on option and then automatically switch to the other
if it fails ?

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be




-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la
part de Arno Garrels
Envoyé : dimanche 8 janvier 2012 19:30
À : ICS support mailing
Objet : Re: [twsocket] Digest authentication via THttpCli?

Arno Garrels wrote:
 Paul Read wrote:
 THanks for that information I therefore tweaked 
 'AuthDigestParseChallenge' so that Info.Qop is set to 'auth' if no 
 Qop value is given and now the right MD5 is calculated and the server 
 accepts the data.
 
 I'd say this is a server-side bug. 

Though it might be a ICS bug in the RFC 2069 implementation as well, but I
have no idea where. Digest calculation is simple in RFC 2069 and the same
calculation is also used as one part of the RFC 2617 calc. 

 It obviously understands a RFC 2617
 digest however sends an obsolete RFC 2069 WWW-Authenticate response 
 header.

Well, that seems OK as long as the server supports both RFC 2069 and RFC
2617 clients.  

 If I'm not totally misreading this sentence:
 qop-options
  This directive is optional, but is made so only for backward
  compatibility with RFC 2069 [6];
 
 it means that if the qop directive is missing we have to assume RFC
 2069 which calculates the digest differently. 

If not, ICS clients won't be able to authenticate with true old RFC 2069
servers...? 

--
Arno Garrels

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

--
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] hello twsocket@elists.org

2012-01-04 Thread François Piette
 Can somebody please ban this f.. SPAMer?

Done !


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


-Message d'origine-
De : twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] De la
part de Arno Garrels
Envoyé : mercredi 4 janvier 2012 20:02
À : ICS support mailing
Objet : Re: [twsocket] hello twsocket@elists.org

Darren Doggett wrote:
 hey twsocket@elists.org this is an advantage for you 
 http://www.newsonthefly10.com

Can somebody please ban this f.. SPAMer?

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

--
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] Multiple declaration for 'sockaddr'

2011-12-16 Thread François Piette
Just installed BCB XE and with the DVD was the Overbyte package.
I have installed it and trying to use it, but get the error:
Multiple declaration for 'sockaddr'
I know that it is something to do with the winsock file.
I have tried to move around with the includes, but no luck.
I have also for many years ago read something about a fix for this error.
Something about uncommenting something somewhere, but can't remember
what.
Anyone hwo have a fix for this...?

First of all, please download the latest version from wiki.overbyte.be. The
version on Embarcadero DVD was prepared with the beta version. It is subject
to changes in the final product and has been updated since then. So download
the latest version and try again...

Also there are already 3 updates available for Delphi/BCB XE. Be sure to
install it !

Once those updates have been installed, try the sample applications
delivered with ICS. They should work out of the [virtual] box. If not,
please report any issue here. Then start your own development.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Client Server connectivity

2011-12-15 Thread François Piette
How does one handle client/server connectivity in a way that avoids needing

 to do port forwarding in routers? Ie Something like LogmeIn.com.  
 How do they have it so you log into their server and can contact the
client machine 
 even behind a firewall?

In those applications, you have a central server located on the internet and
accessible from everywhere. Then you have two clients: one for the guy which
need assistance and one for the guy who provides assistance. The server
relay traffic between the two. The clients stay connected all the time to
the server and the server never initiate the connection to the client.

Another option is to use a plug and play protocol that routers have which
allows a computer to open a port forwarding to him.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Setting additional Header fields depending onthe mimetype in th

2011-12-14 Thread François Piette
 The implementation should be delegated to a handling class which could 
 be replaced easily by the developper. It see a mechanism based on 
 metaclass just like ClientClass property use.

 Or maybe an interface. 

Technically interfaces are very good. But ICS is class based and
introducing interfaces doesn't fit well in the overall design.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] TWSocket in a tread contest without events

2011-12-13 Thread François Piette
 Is possible to use TWSocket object without events contest? 
 I want to use a familiar way for me. 
 I like to create a thread for each connection.

Not sure I understand your question!
Facts:
a) you cannot use TWSocket without using events.
b) you can use TWSocket in a thread. There are samples of multithreaded
programs included with ICS.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Trouble with ICS v7

2011-12-13 Thread François Piette
 I use ICS components in a my application. I have a problem with 
 TWSocket and ServerWSocketDataAvailable. Sometimes, when the 
 ServerWSocketDataAvailable event is called and in action, the same 
 event is called again, before the previous instance is terminated.

 I use line mode, #13#10 as line terminator and BufferIn:= 
 TWSocket(Sender).ReceiveStr(); I not use anything like ProcessMessage 
 or other.

 Perhaps some code indirectly calls the message pump?
 For instance ShowMessage().

 Nothing. Is because I use a limemode way?

No, line mode has nothing to do with that. The symptoms you describe
(reentry in an event handler) are ALWAYS caused by calling the message pump,
directly or indirectly. You should be able to see where it is called by
looking at the call stack if you can manage to put a breakpoint at the time
the event handler is reentered. You could compare the call stack at the time
of reentry with the call stack when no reentry occur.

FYI, anything which display something on screen and wait for user
interaction is calling the message pump !

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Setting additional Header fields depending on the mimetype in th

2011-12-13 Thread François Piette
 I'm just about to change to HttpServer MIME handling again, to use a
look-up list 
 read from the Windows classes registry or a text file) when the server
starts, 
 to replace the current hard coded MIME list.  It will be editable by the
application. 

The implementation should be delegated to a handling class which could be
replaced easily by the developper. It see a mechanism based on metaclass
just like ClientClass property use.

--
francois.pie...@overbyte.be
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://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be