开发者

C# How to make a simple UDP server

开发者 https://www.devze.com 2023-01-23 11:47 出处:网络
Can I make UDP server and client using UdpClient class? And I need to send an Image from the server to all Clients.

Can I make UDP server and client using UdpClient class? And I need to send an Image from the server to all Clients. Can some show me a code sample. I'm new to th开发者_StackOverflow社区is.


Check out the following sample codes:

Listener

Simple UDP Client


System.Net.Sockets.UdpClient is tricky. Some of the constructors specify the local end point, while others specify the remote end point. To establish two way communication, use a constructor that specifies the local end point.

Specify the default remote end point with Connect, or use a Send/BeginSend overload that specifies the remote end point.

0

精彩评论

暂无评论...
验证码 换一张
取 消