This should get you started:
Simple Chat Application Using .Net Sockets[
^]
Usually only the server needs a "fixed" port.
Here is one alternative:
If you want your clients to activly listen to a port on the client machine, you probably need to store this information in a central database to ease management. The client can read it's configuration information from the server during initialization.
Another, and maybe better alternative is to use the functionality under the System.Net.PeerToPeer namespace.
Here is an example
Peer Channel Chat[
^]
Regards
Espen Harlinn