Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        singalFileStream = new FileStream("singal.txt", FileMode.Create, FileAccess.Write);
        string ip = useEc2 ? ec2_ip : local_ip;

        tcpNetComp = new NetComp(ip, tcpPort);
        kcpNetComp = new KcpNetComp(ip, kcpPort, 123);
        udpNetComp = new UdpNetComp(ip, udpPort);
        tcpNetComp.Start();
        udpNetComp.Start();
        kcpNetComp.Start();
        StartCoroutine(SendCo());
        StartCoroutine(SampleCo());
    }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     udpNetComp = new UdpNetComp("127.0.0.1", 8080);
     udpNetComp.Start();
     StartCoroutine(SendCo());
 }