Client chat It is not possible to read data from the transport link:

Asked

Viewed 139 times

1

Hello everyone is the following I made a Tc Pque server I already concluded, in the last days I have been doing the client but is giving the following error

Cannot read data from transport link: A blocking operation was interrupted by a call to Wsacancelblockingcall.

The error is giving in this part of the code

     private void ReceiveMessages()
            {
                srReceiver = new StreamReader(tcpServer.GetStream());
                string ConResponse = srReceiver.ReadLine();
                if (ConResponse[0] == '1')
                {
                    this.Invoke(new UpdateLogCallback(this.UpdateLog), new object[] { "Conected!" });
                }
                else
                {
                    string Reason = "Nao conectado: ";
                    Reason += ConResponse.Substring(2, ConResponse.Length - 2);
                    this.Invoke(new CloseConnectionCallback(this.CloseConnection), new object[] { Reason });

    return;
                }
                while (Connected)
                {

                    try
                    {

                        this.Invoke(new UpdateLogCallback(this.UpdateLog), new object[] { srReceiver.ReadLine() });
                    }
                    catch
                    { }
                }
            }

Update1 Just letting you know I’m connecting with ip 127.0.0.1 with port 1177

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.