CGSF.TCPNetwork.AsyncConnect C# (CSharp) 메소드

AsyncConnect() 공개 메소드

public AsyncConnect ( string ip, int port ) : bool
ip string
port int
리턴 bool
        public bool AsyncConnect(string ip, int port)
        {
            //IPAddress ipAddress = IPAddress.Parse(ip);
            //IPEndPoint ipEndpoint = new IPEndPoint(ipAddress, port);

            //Asynchronous call
            IAsyncResult asyncConnect = tcp.BeginConnect(ip, port, connectCallback, null);

            return true;
        }

Usage Example

예제 #1
0
파일: UIRoot.cs 프로젝트: chenbk85/CGSFII
 public void OnConnect()
 {
     network.AsyncConnect("127.0.0.1", 25251);
     connectionText.text = "Connecting...";
     outputScroll.GetComponentInChildren <Text>().text         = "sdffsdfdsd";
     outputScroll.GetComponentInChildren <Scrollbar>().enabled = true;
 }
All Usage Examples Of CGSF.TCPNetwork::AsyncConnect