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

Ivan Petrov jhs at bse.bg
Mon Jun 9 22:05:04 CEST 2003


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.

This is because the program must do its main job until if an line comes in the 
sin stream, process it and then go back to main job.

...hard to explain... next time I'll use an english dictionary.

there must be a daemon which must be able to accept 1,2 or 3 tcp connections
and react on them while the main job go.

there is an example in the doc, that I rewrote to accept lines.
then I connect to it with telnet localhost <port> and when I enter "quit", 
server closes the connection, but when I'm "idle" the server _waits_
for my input. I don't want this.

any suggestions?

TIA!






More information about the fpc-pascal mailing list