|
-
Jul 19th, 2005, 07:33 AM
#1
Thread Starter
Lively Member
Problem with multiple connections
I'm trying to make a client/server application with the Socket class from .NET but am having some problems.
Once the server is run, 3 clients should be able to connect to it, no more.
The clients aren't supposed to choose a port, they just enter the ip and press connect, the server should make sure that all 3 clients are accepted, and data can be revieved and sent back to them.
Further attempts of clients to connect to the server should be refused, untill another spot opens up. I don't mind whether it's done with a control array or not.
Mainly the problem I have is figuring out how ports are used. A client needs to setup an IPendpoint to connect, so it has to give a port. That port is the port on the serverside it connects with, no? (in that case, which port on the clientside is used).
The port the client uses for the connection, and the port the server uses, don't have to be the same, right?
I'm not asking you guys to write any code, just maybe explain the theory to develop what I'm trying to do.
Thanks in advance,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|