public void StartClientLan()
{
#if !NETFX_CORE
System.Net.IPEndPoint endpoint = Networking.LanDiscovery((ushort)port, 5000, protocolType, IsWinRT);
#else
IPEndPointWinRT endpoint = Networking.LanDiscovery((ushort)port, 5000, protocolType, IsWinRT);
#endif
if (endpoint == null)
{
Debug.Log("No server found on LAN");
return;
}
string ipAddress = string.Empty;
ushort targetPort = 0;
#if !NETFX_CORE
ipAddress = endpoint.Address.ToString();
targetPort = (ushort)endpoint.Port;
#else
ipAddress = endpoint.ipAddress;
targetPort = (ushort)endpoint.port;
#endif
socket = Networking.Connect(ipAddress, targetPort, protocolType, IsWinRT, useNatHolePunching);
Go();
}