Example #1
0
    void Start()
    {
        socket = UdpKitUnityUtils.CreatePlatformSpecificSocket<demoSerializer>();

        if (isServer) {
            socket.Start(new UdpEndPoint(serverAddress));
        } else {
            socket.Start(UdpEndPoint.Any);
            socket.Connect(new UdpEndPoint(serverAddress));
        }
    }
Example #2
0
 public Client()
 {
     socket = UdpSocket.Create<UdpPlatformManaged, ChatSerializer>();
     socket.Start(UdpEndPoint.Any);
     socket.Connect(new UdpEndPoint(UdpIPv4Address.Localhost, 14000));
 }