FAQ
I am implementing a server to proxy arbitrary size data from one socket to
another. As long as data is available in socket , a go routine is
responsible to write out as efficient as possible. I would like to read all
data in socket and write all of data into another socket. But as I know,
golang's read function returns from either EOF, specific length or specific
char. Could I know how many available data in buffer? So that the buffer is
good to fit the reading data and write to socket at once. I thought this
method is the most efficient. Isn't it? Thanks for help.

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJan 31, '15 at 3:40p
activeJan 31, '15 at 8:37p
posts3
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase