forked from powerfun/udpservice
服务端发送消息改用异步方式
This commit is contained in:
1 parent
25c34c0b88
commit
12d1a01543
2 files changed
+2
-2
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user