I am quite novice to networks and tcp/ip so it might be a silly one.
My problem is that whenever I send long messages over WAN from a client and read them using NetworkStream.Read in the server, I'm not reading a complete message but only part of it (The buffer is bigger than the byte array actually read) which causes the messsage parser to fail.
Am I responssibe for checking that the whole message arrived by using NetworkStream.Read over and over until the whole message was received? Doesn't TcpClient know whether the message has arrived successfully? What are the common patterns for handling similar situations? Code snippets would be appritiated!