Commit ed2a669d authored by nanahira's avatar nanahira

add DNS resolve

parent f2755758
......@@ -45,8 +45,8 @@ namespace WindBot.Game
Connection.Connected += OnConnected;
Connection.PacketReceived += OnPacketReceived;
Connection.Connect(IPAddress.Parse(_serverHost), _serverPort);
IPHostEntry _hostEntry = Dns.GetHostEntry(_serverHost);
Connection.Connect(_hostEntry.AddressList[0], _serverPort);
}
private void OnConnected()
......@@ -81,4 +81,4 @@ namespace WindBot.Game
_behavior.OnPacket(reader);
}
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment