Question: im new to C# and any help/feedback would be appreciated. im trying to develop a a client-server program in c#, however i do have different clients sending information to the server side. Is there any function similar to the c language select() such that can help to get all the information from every client side in C#?

here is my server side code:

```
// Create the listening socket...
m_mainSocket = new Socket(AddressFamily.InterNetwork, 
                          SocketType.Stream, ProtocolType.Tcp);
IPEndPoint ipLocal = new IPEndPoint(IPAddress.Any, 9051);

// Bind to local IP Address...
m_mainSocket.Bind(ipLocal);

// Start listening...
m_mainSocket.Listen(10);
Socket clientSock = m_mainSocket.Accept();
byte[] clientData = new byte[1024];
int receivedBytesLen = clientSock.Receive(clientData);
string clientDataInString = 
           Encoding.ASCII.GetString(clientData, 0, receivedBytesLen);
string clientStr = "Client Data Received: " + clientDataInString;
byte[] sendData = new byte[1024];
sendData = Encoding.ASCII.GetBytes(clientStr);
clientSock.Send(sendData);
clientSock.Close();

```

Answer: 
There are higher level constructs, but if you want to get pretty low level, you are probably looking for Socket.Accept:

<http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.accept.aspx>
Here is a code project with some nice diagrams and examples. The underlying "select" is handled by the .NET framework so you have to think / work at a higher level.

At a high level you socket.accept create a thread to process the connection.

<http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.accept.aspx>
http://www.codeproject.com/KB/IP/dotnettcp.aspx