Sign in Join

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

Mailing lists / fpc-pascal / 2001-01

Multithreaded server

6 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Roderick van Domburg

Hi guys,

I was interested in developing a multithreaded server (i.e. one that can serve > 1 connection simultaneously) and I was wondering which way to go. It seems like writing my own "netcode" from start is the way to go, or have you guys had any luck adapting the fcl ssockets unit to this purpose? Interested in your thoughts.

Also note that this application would need to run on both Linux and Win32 platforms, so select() and poll() would be out of the question, right?

Roderick

Reply by email

Sebastian Günther
to Roderick van Domburg
Roderick van Domburg wrote
Also note that this application would need to run on both Linux and Win32 platforms, so select() and poll() would be out of the question, right?

No, on Win32 you would just use the Win32 API function 'WaitForMultipleObjects' or one of its extensions; they work almost the same way as select/poll.

- Sebastian

Reply by email

Roderick van Domburg
to Sebastian Günther
Show quoted text 6 lines
> Also note that this application would need to run on both Linux and Win32 > platforms, so select() and poll() would be out of the question, right? No, on Win32 you would just use the Win32 API function 'WaitForMultipleObjects' or one of its extensions; they work almost the same way as select/poll.

I'm new to Win32 API calls. Would you have any websites, books or sources to recommend?

Reply by email

Kuba Ober
to Roderick van Domburg: I'm new to Win32 API calls. Would you have any websites, books or sources to recommend?
you wrote 11 lines
On Mon, 22 Jan 2001, Sebastian [iso-8859-1] G�nther wrote: > > Also note that this application would need to run on both Linux and > > Win32 platforms, so select() and poll() would be out of the question, > > right? > > No, on Win32 you would just use the Win32 API function > 'WaitForMultipleObjects' or one of its extensions; they work almost the > same way as select/poll. I'm new to Win32 API calls. Would you have any websites, books or sources to recommend?

;-) This is THE basic one:
http://msdn.microsoft.com/library/default.asp

Kuba

Reply by email

Marco van de Voort
to Roderick van Domburg: I'm new to Win32 API calls. Would you have any websites, books or sources to recommend?
Show quoted text 10 lines
> > Also note that this application would need to run on both Linux and Win32 > > platforms, so select() and poll() would be out of the question, right? > > No, on Win32 you would just use the Win32 API function > 'WaitForMultipleObjects' or one of its extensions; they work almost the > same way as select/poll. I'm new to Win32 API calls. Would you have any websites, books or sources to recommend?

Besides the M$ references, Borland also has a good reference on its server (ftp.inprise.com, /pub/techpubs/delphi and deeper or so)

Reply by email