I know this isn't an answer to your problem, but it might be related.  The
HTTPSocket class has a synchronous mode on the Get and Post methods.  And it
is a subclass of the TCPSocket class.  If they can have a synchronous mode
for HTTPSockets I'm sure there must be a way to do it for TCPSockets as
well.

On 4/15/07, Guillermo <[EMAIL PROTECTED]> wrote:
>
> I'm writing a client-server applications, the server send a command to
> the server and it need to wait for the response to continue.
>
> For example, imagine a database server the client send a packet:
>
> ....
> sendToServer("select * from customers")
> ....
>
> The sendToServer method has to send the packet and wait for the
> response, What is the better method to wait? now I have a simple loop
> but consumes a lot of CPU (I can't sleep the main thread):
>
> while not respArrived
>
> end while
>
> and in the socket event: respArrived=true
>
> Are there another method?
>
> Thanks in advance
>
>       Guillermo
>
>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to