什么是在我的Web应用程序中使用udp发送和接收消息的分步过程 [英] what is the step by step procedure to send and receive message using udp's in my web application
问题描述
在我的网络应用程序中使用udp在局域网中发送和接收消息的一步一步程序是什么?我应该在课堂上编写发送方法和接收方法请帮助我
我的发送者代码在按钮点击事件中它没有给出任何错误,但我需要如何在我的应用程序中为接收器编写代码
Socket s = new Socket(AddressFamily.InterNetwork,SocketType.Dgram,
ProtocolType.Udp);
IPAddress broadcast = IPAddress.Parse( 192.168.0.109);
byte [] msg = new Byte [256];
// byte [] sendbuf = Encoding.ASCII.GetBytes(args [0] );
IPEndPoint ep =新IPEndPoint(广播,11000);
s.SendTo(msg,ep);
Response.Write(test)
提前感谢....
what is the step by step procedure to send and receive message using udp's in my web application with in a LAN where should i have to write sender method and receiver method in my class please help me
my sender code in button click event it is not giving any error but i need how to write code for receiver in my application
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram,
ProtocolType.Udp);
IPAddress broadcast = IPAddress.Parse("192.168.0.109");
byte[] msg = new Byte[256];
// byte[] sendbuf = Encoding.ASCII.GetBytes(args[0]);
IPEndPoint ep = new IPEndPoint(broadcast, 11000);
s.SendTo(msg, ep);
Response.Write("test")
thanks in advance....
推荐答案
Google for c#sockets,你会发现很多样本。
Google for "c# sockets" and you will find lots of samples.
这篇关于什么是在我的Web应用程序中使用udp发送和接收消息的分步过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!