Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-10

FreePascal as a server?

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tim Gustafson

Hello

I was wondering if anyone had any luck making a multi-threaded TCP/IP server in FreePascal? Any pointers or sample could would be excelent.

Thanks!

Tim

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Tim Gustafson - http://www.falconsoft.com/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Share your knowledge - it's a way to achieve immortality. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

You need only two tools. WD-40 and duct tape.
If it doesn't move and it should, use WD-40.
If it moves and shouldn't, use the tape.

Reply by email

Peter Vreman
to Tim Gustafson
you wrote
Hello I was wondering if anyone had any luck making a multi-threaded TCP/IP server in FreePascal? Any pointers or sample could would be excelent.

The heapmanager in the RTL is not threadsafe. Using the cmem unit it is possible as long as you don't use standard pascal IO like Writeln()/Readln(). You need to use the fdopen() from the Unix unit.

Peter

Reply by email

Tim Gustafson
to Peter Vreman
The heapmanager in the RTL is not threadsafe. Using the cmem unit it is possible as long as you don't use standard pascal IO like Writeln()/Readln(). You need to use the fdopen() from the Unix unit.

What about forking multiple processes, as Apache does? Would that be safer?

Tim

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Tim Gustafson - http://www.falconsoft.com/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Share your knowledge - it's a way to achieve immortality. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

You need only two tools. WD-40 and duct tape.
If it doesn't move and it should, use WD-40.
If it moves and shouldn't, use the tape.

Reply by email