예제 #1
0
파일: demoPeer.cs 프로젝트: Eqric/udpkit
    void Start()
    {
        socket = UdpKitUnityUtils.CreatePlatformSpecificSocket<demoSerializer>();

        if (isServer) {
            socket.Start(new UdpEndPoint(serverAddress));
        } else {
            socket.Start(UdpEndPoint.Any);
            socket.Connect(new UdpEndPoint(serverAddress));
        }
    }
예제 #2
0
파일: Program.cs 프로젝트: trecchia/udpkit
 public Client()
 {
     socket = UdpSocket.Create<UdpPlatformManaged, ChatSerializer>();
     socket.Start(UdpEndPoint.Any);
     socket.Connect(new UdpEndPoint(UdpIPv4Address.Localhost, 14000));
 }