[Gambas-user] server socket problem

Benoît Minisini gambas at ...1...
Sun May 24 23:15:44 CEST 2009


> Benoît Minisini wrote:
> > The WRITE instruction will block your program if the internal socket
> > buffer is
> > full because the reader is not fast enough to get it.
>
> Thank you Benoit.
> But, how can to workaround this?

You raise a point there. There is no code in the gb.net component to warn when 
writing on the socket is possible (i.e. when it won't block).

On Gambas 3, you have a Blocking property that allows you to make the WRITE 
instruction not blocking.

But this is not enough. You need to know how many bytes were really wrote, to 
send the rest later, and you need to be warn where writing is possible.

I'm afraid I won't be able to fix that for Gambas 2.x.

Regards,

-- 
Benoît




More information about the User mailing list