Hi,

I needed a DNS client on Google App Engine and outgoing UDP/TCP connections
must be made with the appengine/socket package.  The socket.Conn satisfies
the net.Conn interface, but not the net.TCPConn or net.UDPConn interfaces.
 Where you convert these connections in your code I did not see anything
that required the TCP/UDP based connections - you can do what you need with
a Read/Write.  This plus the build tags to remove the listen calls (not
supported on GAE) allows this code to be used there.

You unit tests were not passing for me before the modifications so I was
not able to check those, but it passes functional testing on GAE, and on a
normal Linux desktop.

~Eric


On Wed, Oct 2, 2013 at 12:10 PM, Miek Gieben <notifications@github.com>wrote:

> In client.go:
>
> > @@ -166,7 +166,7 @@ func (w *reply) read(p []byte) (n int, err error) {
> >  	switch w.client.Net {
> >  	case "tcp", "tcp4", "tcp6":
> >  		setTimeouts(w)
> > -		n, err = w.conn.(*net.TCPConn).Read(p[0:2])
>
> Why are these changes needed?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/miekg/dns/pull/58/files#r6719631>
> .
>