Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 May : Re: How can i read stack size on a client ?

www.cryer.info
Managed Newsgroup Archive

Re: How can i read stack size on a client ?

Subject:Re: How can i read stack size on a client ?
Posted by:"Ahmadi" (ahmadisolness..@yahoo.com)
Date:Wed, 30 May 2007 14:01:33 +0330

i was used ICS before, its nice, but for now i want use indy.
Thanks for your suggest

"Francois PIETTE [ICS - MidWare]" <francois.piette@overbyte.be> wrote in
message news:465aa13d$1@newsgroups.borland.com...
>> yes,im using blocking sockets
>> i have some threads in my application
>> and a thread for reading from port
>> when my thread want wait to read from port my otherthead lock and then my
>> program  will hang!
>> i dont know why but if i remove other thread then one thread work
>> correctly
>
> Maybe you should switch to the asynchronous programming model ? I mean
> using asyncrhnous sockets such as ICS socket (or others).
>
> In that async model, you don't wait for data to comes in, you just get an
> event when data is available, from the event handler you read (or receive
> whatever the method is named) the data which is available. Reading data is
> not blocking. You get as many data is available or as much as you request
> (in case your buffer is smaller than already received data. You'll get the
> remaining data in your next call to read or receive).
>
> Using the async model, you may even forget about creating thread. You'll
> be able to send/receive data to/from several hosts without being blocked
> and without creating any thread. Async model is a little bit difficult to
> grasp when you start, but once you've understood how it works, it become
> very easy and very natural in the Windows environment.
>
> Using the async model for TCP/IP I/O is very close to using user interface
> events. For example, you never wait until the user click on a button, you
> simply write the conde in the button OnClick event. Similary, with async
> TCP/IP, you never wait for data to be received, you simply code your data
> handling from the OnDataAvailable event.
>
> ICS use the async programming model. Download full freeware source code
> from http://www.overbyte.be. And if you have any question, please use ICS
> support mailing list where almost one thousand peoples are sharing their
> knowledges. See "support" link at ICS website for details.
>
> Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
> --
> francois.piette@overbyte.be
> The author of the freeware multi-tier middleware MidWare
> The author of the freeware Internet Component Suite (ICS)
> http://www.overbyte.be

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive