[2] at least with CoreDNS, while it's not spelled out, my understanding is that:
If I may chime in, I'd like to see documentation to spell out how to reuse dns.Msg:
I think the choice of moving session stuff elsewhere was the right one. Imo validation and Is* functions should also be moved out.
Order of the TCP messages is broken here:
b07b0629b3/server.go (L354-L358)
If SUBSCRIBE and UNSUBSCRIBE arrive (in that...
serveTCP's read blocks, for the specified timeout, all other reads including zero-length:
2c08268ee9/server.go (L342-L345)
...
Asked whether zero-reads are disallowed for the case above in the #crypto channel of Gopher's slack. Heres the answer I got from...
At least on Darwin the following workaround (?) seems to work:
- i, err = conn.Read(make([]byte, 0))
+ i, err = conn.NetConn().Read(make([]byte, 0))
But the doc for tls.Conn.Ne...
One can do it if they do the non-zero reading.
I’m all for it and I don’t mind polling. But it needs to be portable and, for my use case, work with both tls.Conn and net.TCPConn.
I’ll...
Quick test against CoreDNS's tls server:
package main
import (
"crypto/tls"
"fmt"
)
func main() {
conn, err := tls.Dial("tcp", "127.0.0.1:8853", &tls.Config{
InsecureSkipVer...
Alas, this won't work for tls.Conn:
func(c*Conn)Read(b[]byte)(int,error){iferr:=c.Handshake();...Meanwhile i'm pushing simplications in #192
Perhaps `hijacked = hijacked
Think a zero byte read should fail in that case - haven't tried it.
https://github.com/golang/go/issues/10940, in particular the last comment. The current doc for [https://pkg.go.dev/io#Reader...
This test passed before because wg.Add(1) was not called until a valid message was seen. Now wg.Add(1) is called at the very beginning and wg.Done(1) is not called until the reading loop is...
The test is stuck reading from the socket. SetReadDeadline doesn't seem to be set to unblock read on shutdown.
I mean if you hijack it would be nice to learn the listener for this tcp conn went away
Did the last diff capture what you referred to here, or was it something else?
Maybe it's better for Hijack to return error?