1
This commit is contained in:
@@ -22,10 +22,19 @@ namespace Assets.MyGame.Scripts.Net
|
||||
string[] msgs = msg.Split('\u001e');
|
||||
foreach (var item in msgs)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(item))
|
||||
continue;
|
||||
|
||||
if (item.Trim() == "{}")
|
||||
{
|
||||
OnHandshakeCompleted(type);
|
||||
continue;
|
||||
}
|
||||
|
||||
var v = JsonConvert.DeserializeObject<WebSocketResponseBase<object>>(item);
|
||||
if (v == null)
|
||||
{
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
// TODO: 这里可以做统一消息分发
|
||||
#region 消息处理
|
||||
|
||||
Reference in New Issue
Block a user