Select Function and how Work with it
Select Function and how Work with it
Select Function and how Work with it
Select Function and how Work with it
Select Function and how Work with it
Select Function and how Work with it Select Function and how Work with it Select Function and how Work with it Select Function and how Work with it Select Function and how Work with it Select Function and how Work with it Select Function and how Work with it Select Function and how Work with it
Select Function and how Work with it Select Function and how Work with it
Select Function and how Work with it
Go Back  Xtreme Visual Basic Talk > > > Select Function and how Work with it


Reply
 
Thread Tools Display Modes
  #1  
Old 08-05-2011, 12:34 PM
ntaryl's Avatar
ntaryl ntaryl is offline
Newcomer
 
Join Date: Oct 2005
Posts: 13
Default Select Function and how Work with it


Good evening
I play a bit with Multithread Socket(true) and read on the net must to work with Select Function to check each socket status and after do the Job .
Want if someone know to exaplian me about this .
How work ?
And some tips to solve it
I can say i solve the problem with Workthreads (use many cpu in Recv)Now when the WorkThread run for any Client the cpu stay the same ...xixixix.
Reply With Quote
  #2  
Old 08-05-2011, 02:34 PM
dilettante's Avatar
dilettanteSelect Function and how Work with it dilettante is offline
Underclocked lifestyle

Forum Leader
* Guru *
 
Join Date: Feb 2005
Location: Michigan, USA
Posts: 4,403
Default

No idea what you are talking about. VB6 doesn't use Select at all normally, unless you are coding against the Winsock API. Even then Select is considered a very bad way to go, a vestige of impoverished *nix systems where Winsock has it roots.

Creating worker threads isn't always very practical in a VB6 program either.

Are you in the wrong forum, even at the wrong forum site?
Reply With Quote
  #3  
Old 08-06-2011, 12:52 PM
ntaryl's Avatar
ntaryl ntaryl is offline
Newcomer
 
Join Date: Oct 2005
Posts: 13
Default

Good evening


Sorry for the Delay but yesterday night is so long.
I code a multithread Socket and use native api for communication.
Main thread load sucessfully and the Listenthread also.In the Listen thread i have a infinite Loop to accept connections and for any new connection pass the acceptHandle in a workThread .
Everything working like a charm but when pass the acceptHandle in a workthread and load , CPu go on the sky .Reason : The infinite Loop for recv function .I use Select Function to check if there is Data Available and now in the loop check first for data available and after call recv function my cpu stay down.xixixix
Now need the way to manage the MultipleConnections ..
I create for example 20 Clients = 20 Threads and when try to send data i able to send only from last Client .
Must to use Select to check each Socket status(readable,writteable)
U try before something like this
U know where can find a sample with native api(multiclient)

p.s :ScreenShot from a Server(100 Client Threads )
sorry for my English
Attached Images
File Type: jpg Screen03.JPG (161.6 KB, 10 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Select Function and how Work with it
Select Function and how Work with it
Select Function and how Work with it Select Function and how Work with it
Select Function and how Work with it
Select Function and how Work with it
Select Function and how Work with it Select Function and how Work with it Select Function and how Work with it Select Function and how Work with it Select Function and how Work with it Select Function and how Work with it Select Function and how Work with it
Select Function and how Work with it
Select Function and how Work with it
 
Select Function and how Work with it
Select Function and how Work with it
 
-->