C# How to make a simple UDP server

2019-01-11 18:55发布

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 this.

标签: c# sockets udp
2条回答
该账号已被封号
2楼-- · 2019-01-11 19:19

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.

查看更多
SAY GOODBYE
3楼-- · 2019-01-11 19:43

Check out the following sample codes:

Listener

Simple UDP Client

查看更多
登录 后发表回答