🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
3 messages
3 total messages Started by Colin B Maharaj Fri, 16 Sep 2005 11:03
TServerSocket thread priority
#3441
Author: Colin B Maharaj
Date: Fri, 16 Sep 2005 11:03
9 lines
1229 bytes
I want to set the server socket thread priority something like this....

   ServerSocket = new TServerSocket(NULL);
   ServerSocket->Priority = tpLower;


Of course it does not work. Is there some kind of work around.....

Thanks!
Re: TServerSocket thread priority
#3444
Author: Mark Guerrieri
Date: Fri, 16 Sep 2005 22:52
26 lines
1904 bytes
ServerSocket = new TServerSocket(NULL);
TServerWinSocket* sws =  ServerSocket->Socket;

TServerWinSocket has properties ActiveThreads and IdleThreads, and method
GetClientThread, all of which return a TThread derivative to which you can
assign Priority = tpLower.  You can use the Connections property to get all
connected TServerClientWinSocket objects which you can pass to
GetClientThread.

An easier method is to handle the TServerSocket.OnThreadStart event and set
the priority of the Thread parameter to change the thread's priority
whenever a new client connection begins.

Mark

"Colin B Maharaj" <noreply@myhost.com> wrote in message
news:432aa60e$1@newsgroups.borland.com...
> I want to set the server socket thread priority something like this....
>
>    ServerSocket = new TServerSocket(NULL);
>    ServerSocket->Priority = tpLower;
>
>
> Of course it does not work. Is there some kind of work around.....
>
> Thanks!
Re: TServerSocket thread priority
#3446
Author: Colin B Maharaj
Date: Sun, 18 Sep 2005 01:22
34 lines
2204 bytes
Hi Mark, thanks for the speedy response, I will give it a try...


Mark Guerrieri wrote:
> ServerSocket = new TServerSocket(NULL);
> TServerWinSocket* sws =  ServerSocket->Socket;
> 
> TServerWinSocket has properties ActiveThreads and IdleThreads, and method
> GetClientThread, all of which return a TThread derivative to which you can
> assign Priority = tpLower.  You can use the Connections property to get all
> connected TServerClientWinSocket objects which you can pass to
> GetClientThread.
> 
> An easier method is to handle the TServerSocket.OnThreadStart event and set
> the priority of the Thread parameter to change the thread's priority
> whenever a new client connection begins.
> 
> Mark
> 
> "Colin B Maharaj" <noreply@myhost.com> wrote in message
> news:432aa60e$1@newsgroups.borland.com...
> 
>>I want to set the server socket thread priority something like this....
>>
>>   ServerSocket = new TServerSocket(NULL);
>>   ServerSocket->Priority = tpLower;
>>
>>
>>Of course it does not work. Is there some kind of work around.....
>>
>>Thanks!
> 
> 
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads