void Start() { socket = UdpKitUnityUtils.CreatePlatformSpecificSocket<demoSerializer>(); if (isServer) { socket.Start(new UdpEndPoint(serverAddress)); } else { socket.Start(UdpEndPoint.Any); socket.Connect(new UdpEndPoint(serverAddress)); } }
public Client() { socket = UdpSocket.Create<UdpPlatformManaged, ChatSerializer>(); socket.Start(UdpEndPoint.Any); socket.Connect(new UdpEndPoint(UdpIPv4Address.Localhost, 14000)); }