forked from powerfun/udpservice
服务端发送消息改用异步方式
This commit is contained in:
parent
25c34c0b88
commit
12d1a01543
@ -43,7 +43,7 @@ namespace OnlineUserPool.Services
|
||||
var session = _server.FindSession(endPoint);
|
||||
if(session != null && session.IsConnected)
|
||||
{
|
||||
session.Send(dgram);
|
||||
session.SendAsync(dgram);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ namespace OnlineUserPool.Services
|
||||
|
||||
public void Send(byte[] dgram, int bytes, IPEndPoint endPoint)
|
||||
{
|
||||
udpServer.Send(dgram, bytes, endPoint);
|
||||
udpServer.SendAsync(dgram, bytes, endPoint);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user