Beispiel #1
0
        void Awake()
        {
            udp            = new UDPEndPoint();
            udp.listenPort = port;

            if (handle == null)
            {
                handle = GetComponent <MessageHandle>();
            }
        }
Beispiel #2
0
        void Awake()
        {
            if (handle == null)
            {
                handle = GetComponent <MessageHandle>();
            }

            if (handle == null)
            {
                Debug.Log("no message handler");
            }

            messageQueue = new List <string>();
            binaryQueue  = new List <byte[]>();
        }
Beispiel #3
0
        void Start()
        {
            status = Status.Disconnected;

            var dns = GetComponent <DNSResolver>();

            if (dns != null && dns.enabled)
            {
                endPoint = new IPEndPoint(dns.Resolve(), port);
            }
            else
            {
                endPoint = new IPEndPoint(IPAddress.Parse(IP), port);
            }

            messageQueue = new List <string>();
            handle       = GetComponent <MessageHandle>();

            initialized = true;
        }