Skip to content

Instantly share code, notes, and snippets.

@ZachMassia
Created July 14, 2013 03:52
Show Gist options
  • Save ZachMassia/5993149 to your computer and use it in GitHub Desktop.
Save ZachMassia/5993149 to your computer and use it in GitHub Desktop.
bufio.ReadWriter from net.Conn
type Client struct {
rw *bufio.ReadWriter
// ...
}
func NewClient(conn net.Conn) *Client {
rw := bufio.NewReadWriter(bufio.NewReader(conn), bufio.NewWriter(conn))
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment