![]() |
|
#1
|
|||
|
|||
Basic understanding on winsock select()Hey! I im pretty new in winsock. And i want to learn more about it and its functions. So I will ask some questions about different matters in select so i can understand it. Beej`s tutorial doesnt have so good explenations about it.
What about this one. CPP / C++ / C Code:
Can someone give me a basic explenation on this one? why are there NULL, NULL and NULL? |
|
#2
|
|||
|
|||
|
select watches for status changes on the file descriptors designated by the second,third and fourth fields of the call.
The fields represent (..., read_fd, write_fd, exectption_fd,...) Passing NULL to any of these fields says that you do not care what happens there. In your case - `I'm not interested in my file descriptors changing status for writing or execption purposes, only for read changes`. The final field represents a timeout option. If passed NULL, it means you want to have a blocking call (it wont return until something happens). Google man select for the manual pages detailing the call's specifics. |
Recent GIDBlog
Meeting the local Iraqis by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [PROGRAM] Winsock Programming | Max Payne | MS Visual C++ / MFC Forum | 1 | 08-Mar-2007 23:38 |
| MSDN's Great Contribution To Understanding Dial Up Networking... | mithunjacob | Open Discussion Forum | 2 | 25-Jun-2004 05:36 |
| select problem | zuzupus | MySQL / PHP Forum | 0 | 15-Aug-2003 07:25 |
| combo box select problem | zuzupus | MySQL / PHP Forum | 2 | 23-Jul-2003 11:25 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The