tag:blogger.com,1999:blog-29245039.post5788439831584305490..comments2022-03-31T08:55:31.928+05:30Comments on Angrez's blog: Flush Socket in .NET or C#Angrez Singhhttp://www.blogger.com/profile/12744008535212551340noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-29245039.post-66832390501141154822009-08-03T00:35:22.055+05:302009-08-03T00:35:22.055+05:30what about the Socket.NoDelay Property ?what about the Socket.NoDelay Property ?Johannes Gotlénhttps://www.blogger.com/profile/06876777144140056377noreply@blogger.comtag:blogger.com,1999:blog-29245039.post-62292044590448212592008-07-19T02:14:00.000+05:302008-07-19T02:14:00.000+05:30The previous comment does not understand what Angr...The previous comment does not understand what Angrez mean.<BR/>I have struggled with this issue for a week and this solution works perfectly.<BR/>Instead of sending and encoding byte-arrays with risc of not getting all data at once you can use StreamReader and StreamWriter.<BR/><BR/>I will share a little piece of my code.<BR/><BR/>My original write code:<BR/>sendBytes = Encoding.Unicode.GetBytes(Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-29245039.post-86900892150360844672008-06-17T20:52:00.000+05:302008-06-17T20:52:00.000+05:30No. Flush has no effect.From http://msdn.microsoft...No. Flush has no effect.<BR/><BR/>From http://msdn.microsoft.com/en-us/library/system.net.sockets.networkstream.flush.aspx<BR/><BR/>"The Flush method implements the Stream..::.Flush method; however, because NetworkStream is not buffered, it has no affect on network streams."Anonymousnoreply@blogger.com