在tcpclient.GetStream()之后进行构造其他对象出现组塞为什么?

解决方案 »

  1.   

    public bool Init(string strAddress, int iPort)
    {
    bool bConnect = false;
                SymmetricAlgorithm symm;
                RSACryptoServiceProvider rsa;
               C_AsymmetricAlgorithm.CryptoClient newCryptoClient = new C_AsymmetricAlgorithm.CryptoClient();
    try
    {
    this.strServerAddr = strAddress;
    this.iServerPort = iPort;

    mTCPClient = new TcpClient();
    mTCPClient.Connect(strAddress, iPort);
                    mTCPClient.ReceiveBufferSize = 8192*5;
                   
                                    //Connected. Sending public key
                    //rsa = new RSACryptoServiceProvider();
                    //rsa.KeySize = newCryptoClient.TDES_KEY_SIZE_BITS;
                    //newCryptoClient.sendPublicKey(rsa.ExportParameters(false), mTCPClient);
                    mStream = mTCPClient.GetStream(); bConnect = true;
    }程序片断如上,望达人能够回复