As I mentioned earlier, Raymond Chen has some good tips on this: if you should ask about OS limitations, you are probably doing something wrong. IP allows a maximum of 65535 ports, and many of them are reserved and not available for general use. I would suggest that your messaging protocols need to be thought out in more detail so that OS limitations are not a problem. I am sure that there are many good resources describing such systems, and there are, of course, people here who would have good ideas about this.
EDIT: I'm going to voice some thoughts on implementing a scalable chat server.
, . (, ), :
create message packet
open port to server
send packet
close port
:
connection request received
get packet
close connection
process packet
for each client that requires updating
open connection to clients
send update packet
close connection
, , , " " IP- . . , , , . , " ". , .
, .