c# 套接字编程的一个很奇怪的问题
在网上看了一个简单的例子,编译运行一切正常,但我在服务器端使用   
 /*************************/ 
 Socket   temp   =   s.Accept();//为新建连接创建新的Socket。 
    Console.WriteLine( "remoteEndpoin   {0} ",temp.RemoteEndPoint.ToString()); 
 /*************************/   
 输出客户端的ip地址和端口号时,ip地址是对的   127.0.0.1 
 但端口号却是个随机值   ,这是什么原因?   
 代码如下 
 /******************************************************************/ 
 服务器端:     
 using   System; 
 using   System.Collections.Generic; 
 using   System.Text;   
 using   System.IO; 
 using   System.Net; 
 using   System.Net.Sockets;   
 namespace   socket 
 { 
             class   serverApp 
             { 
                         static   void   Main(string[]   args) 
                         { 
                                     try 
                                     {                                                   
                                                 int   port   =   2000; 
                                                 string   host   =    "127.0.0.1 "; 
                                                 IPAddress   ip   =   IPAddress.Parse(host); 
                                                 IPEndPoint   ipe   =   new   IPEndPoint(ip,   port); 
                                                 Socket   s   =   new   Socket(AddressFamily.InterNetwork,   SocketType.Stream,   ProtocolType.Tcp);//创建一个Socket类 
                                                 s.Bind(ipe);//绑定2000端口 
                                                 s.Listen(0);//开始监听                                                    
                                                 Console.WriteLine( "Wait   for   connect "); 
                                                 Socket   temp   =   s.Accept();//为新建连接创建新的Socket。 
                                                 Console.WriteLine( "remoteEndpoin   {0} ",temp.RemoteEndPoint.ToString()); 
                                                 Console.WriteLine( "Get   a   connect "); 
                                                 string   recvStr   =    " ";