[fpc-pascal]sockets (a beginer's question) (client-server)

Michael Van Canneyt michael.vancanneyt at wisa.be
Tue Jun 10 09:44:40 CEST 2003

On Mon, 9 Jun 2003, Ivan Petrov wrote:

> Hello!
> At first I have to send my thanks to Rainer Hantsch
> for my first question!
> And then I beg your pardon for my bad english! I hope you'll understand me.
> so...oCrt is a very good unit !!!...and so easy to use!
> But after a couple of days of testing diferent
> example programs (from fpc docs),
> I went to my second problem :-(
> As you may guess I just start with linux programming...
> The question:
> Can I check if there is data pending in "sin" after I accept a connection and
> sin and sout streams are up.

You should use the select() call from the linux unit.
This will check if data is available on some file descriptor.
You can set a timeout.

Examples are provided in the documentation.


More information about the fpc-pascal mailing list