![]() Closing the tcpClient instance does not close the network stream. ReturnedData = (bytes) Ĭonsole.WriteLine("Data read." + returnedData) Ĭonsole.WriteLine("You cannot read data from this stream.") received response, now encoding it to a string from a byte array Int bytesread = tcpIpClient.ReceiveBufferSize StreamWriter.Write("$" + command + GetCheckSum(command) + "0") Ĭonsole.WriteLine("IO exception WRITE" + excep.StackTrace) īyte bytes = new byte ![]() StreamWriter = new StreamWriter(netStream) Ĭonsole.WriteLine("Error. I believe that is something wrong with my program, because if I run Client program on my PC written in python, it works continiously, not just once.īut intersting thing is, that same client code works perfectly with some industrial device, which uses TCP/IP for communication. I also set static IP on my server and connect it direct in my PC but still the same. ![]() I turned it off both of it and still the same. I read about that exception that may be caused of windows firewall or anti virus program. Unable to read data from the transport connection: An established connection was aborted by the software in your host machine. Sometimes before program freezes, after calling ReadData I get next exception: IO exception WRITE at .Write(Byte buffer, Int32 offset, Int32 size)Īt System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)Ī first chance exception of type 'System.IO.IOException' occurred in System.dll I get IO exception, if I am trying to send data more than once: I can connect to my server, send string to it and get answer from it, but just for the FIRST time, than my program totally freezes. I am connecting on it with my PC with client program written in C#. Server just answers with reversed string. I have simple server written in python that runs on Raspberry Pi. I have problem that I can't figure it out.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |