title: Peek into Conn without reading in go
body: <p>I have a server <code>net.Conn</code>, and I'd like to peek into it before reading out bytes, to check if it's a plain text protocol the client is trying to use, or SSL/TLS.</p>
  <p>Checking <a href="http://golang.org/pkg/net/" rel="nofollow noreferrer">http://golang.org/pkg/net/</a>, it seems the <code>Conn</code> interface does not have anything like that. I know I could use an <code>iobuf.Reader</code>, but I'd like to get a TLS Conn via <code>tls.Conn(conn, config)</code> if it turns out the client is using SSL/TLS, and <code>bufio.Reader</code> would read from the original <code>Conn</code>, thus the handshake in <code>tls.Conn</code> would fail.</p>
  <p>So is there any way to peek into a <code>Conn</code> in Go (something like <code>MSG_PEEK</code> in C/C++ sockets)? Or, to create a <code>tls.Conn</code> after I had read out the first few bytes from the underlying <code>Conn</code>?</p>