2017-04-17 19:05 GMT+03:00 Kevin Johnson <jkevinm...@gmail.com>: > Hi Vasiliy, > > I spent a few minutes looking at your program and a couple things jumped out > at me. As you are probably aware, writes on a network socket usually return > the number of bytes written, This is because if the TCP buffer fills, then > the write call will return only the amount that got added. I noticed you > used a timeout on the TCP conn, which probably puts the connection into > non-blocking mode. I would be surprised if binary.write was smart enough to > attempt multiple writes in case of a partial write. You might try removing > the time-out and see if that has any effect. (Network non-blocking writes > may wait for the entire write to succeed before returning). You might also > use the binary.write to write to a local block of bytes and then use the > conn send to send them manually, resending the parts when the writes only > partially complete.
Ok, thanks! I'm try to write to buffer and use simple net.Conn Write. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.