예제 #1
0
    // Token: 0x06000937 RID: 2359 RVA: 0x0004441D File Offset: 0x0004261D
    public static TcpClient CreateSocket()
    {
        TcpClient tcpClient = new TcpClient(AddressFamily.InterNetwork);

        ZSocket2.ConfigureSocket(tcpClient);
        return(tcpClient);
    }
예제 #2
0
 // Token: 0x06000750 RID: 1872 RVA: 0x0003AB44 File Offset: 0x00038D44
 public ZSocket2 Complete()
 {
     if (this.m_socket != null && this.m_socket.Connected)
     {
         ZSocket2 result = new ZSocket2(this.m_socket, this.m_host);
         this.m_socket = null;
         return(result);
     }
     this.Close();
     return(null);
 }
예제 #3
0
    // Token: 0x06000942 RID: 2370 RVA: 0x00044908 File Offset: 0x00042B08
    public ISocket Accept()
    {
        if (this.m_listner == null)
        {
            return(null);
        }
        if (!this.m_listner.Pending())
        {
            return(null);
        }
        TcpClient socket = this.m_listner.AcceptTcpClient();

        ZSocket2.ConfigureSocket(socket);
        return(new ZSocket2(socket, null));
    }
예제 #4
0
    // Token: 0x06000752 RID: 1874 RVA: 0x0003AB8C File Offset: 0x00038D8C
    private void OnHostLookupDone(IAsyncResult res)
    {
        IPHostEntry iphostEntry = Dns.EndGetHostEntry(res);

        if (this.m_abort)
        {
            ZLog.Log("Host lookup abort");
            return;
        }
        if (iphostEntry.AddressList.Length == 0)
        {
            this.m_dnsError = true;
            ZLog.Log("Host lookup adress list empty");
            return;
        }
        this.m_socket = ZSocket2.CreateSocket();
        this.m_result = this.m_socket.BeginConnect(iphostEntry.AddressList, this.m_port, null, null);
    }