主题:关于C#网络编程的一个初级问题
下面是msdn上的关于C#网络编程的一段程序
Socket s = new Socket(lep.Address.AddressFamily,SocketType.Stream,ProtocolType.Tcp);
//Using the AddressFamily, SocketType, and ProtocolType properties.
Console.WriteLine("I just set the following properties of socket: " +
"Address Family = " + s.AddressFamily.ToString() +
"\nSocketType = " + s.SocketType.ToString() +
"\nProtocolType = " + s.ProtocolType.ToString());
结果是把套接字的AdressFamliy,SocketType,ProtocolType显示再控制台上。
但是lep 是从哪儿来的,作用是什么啊,msdn上老是弄个程序没头没尾。
希望各位大哥给讲一下,我刚开始自学到网络编程。
谢谢!
Socket s = new Socket(lep.Address.AddressFamily,SocketType.Stream,ProtocolType.Tcp);
//Using the AddressFamily, SocketType, and ProtocolType properties.
Console.WriteLine("I just set the following properties of socket: " +
"Address Family = " + s.AddressFamily.ToString() +
"\nSocketType = " + s.SocketType.ToString() +
"\nProtocolType = " + s.ProtocolType.ToString());
结果是把套接字的AdressFamliy,SocketType,ProtocolType显示再控制台上。
但是lep 是从哪儿来的,作用是什么啊,msdn上老是弄个程序没头没尾。
希望各位大哥给讲一下,我刚开始自学到网络编程。
谢谢!