【发布时间】:2009-04-14 06:23:53
【问题描述】:
在 c# 中我使用的是 UdpClient.Receive 函数:
public void StartUdpListener(Object state)
{
try
{
udpServer = new UdpClient(new IPEndPoint(IPAddress.Broadcast, 1234));
}
catch (SocketException ex)
{
MessageBox.Show(ex.ErrorCode.ToString());
}
IPEndPoint remoteEndPoint = null;
receivedNotification=udpServer.Receive(ref remoteEndPoint);
...
但是我收到一个套接字异常,指出地址不可用,错误代码为 10049 我该怎么做才能否定这个例外?
【问题讨论】: