Commit Graph

187 Commits

Author SHA1 Message Date
Miek Gieben 86186e27e4 Just use Read 2013-10-12 18:47:11 +01:00
Miek Gieben aa44c75b91 Merge net branch 2013-10-12 18:32:53 +01:00
Miek Gieben 68083bc956 Fix merge conflict from net branch 2013-10-12 17:59:46 +01:00
Miek Gieben 7691523300 Re-add ExchangeConn
ExchangeConn is back, but with a warning. Other various improvements.
2013-10-12 12:44:02 +01:00
Miek Gieben 97603e3f62 Readd ExchangeConn 2013-10-12 12:35:09 +01:00
Miek Gieben 77d78f3218 More xfr fixes, does not work yet 2013-10-11 22:34:04 +01:00
Miek Gieben ca3c488ad8 Fix transfer 2013-10-11 16:36:37 +00:00
Miek Gieben b987dc6246 More transfer stuff 2013-10-11 16:18:37 +00:00
Miek Gieben 403baeb73a Rework the transfers stuff 2013-10-02 20:35:13 +01:00
Eric Gavaletz 7f3472cc74 Patching to make compatible with appengine/socket.
The interface conversion from socket.Conn to net.UDPConn fails, but
since you can use a generic Read(b) in place of ReadFromUDP(b) it makes
sense to git rid of the conversion to net.UDPConn.  This change allows
the use of the client library for UDP DNS lookup using the
appengine/socket package's Conn.

For the same reasons the interface conversions for TCP connections were
also removed.
2013-10-02 11:41:26 -04:00
Miek Gieben db3de29edc doc updates 2013-09-29 20:30:04 +01:00
Miek Gieben b02f1b5203 Add Timeouts back in.
Fix the timeouts
2013-09-29 11:46:39 +01:00
Miek Gieben 500a32e64f Update all the tests 2013-09-29 11:26:02 +01:00
Miek Gieben 9a38f97391 Fix timeouts, Tsig and EDNS0 update size 2013-09-29 11:21:18 +01:00
Miek Gieben b97b3340fb Make TSIG work again
Start fixing and using the UDP bufsize option.
2013-09-29 10:22:27 +01:00
Miek Gieben 4bde528be5 Export dns.Conn and make it more like net.Conn
Export lowlevel function and types so that they may be used.
They higher level Exchange function is still there. ExchangeConn
is gone, because it is not needed.
2013-09-28 21:58:08 +01:00
Miek Gieben 22977491c3 Try to use Conn 2013-09-28 20:31:29 +01:00
Miek Gieben 2b6e9122bd Use the better name: SingleInflight 2013-09-06 09:49:07 +00:00
Miek Gieben bb71be0271 Implement outstanding query detection.
Copied from the standard library and adapted to Go DNS.
2013-08-24 02:28:58 +00:00
Miek Gieben d117fda34b Perform query inflight deduplication
Taking a queue from Go tip, I copied over the new code and tweaked
it a bit for use in Go DNS.
2013-08-23 22:56:34 +00:00
Miek Gieben 3457c0428d Some work in outstanding query de-deplication 2013-08-23 20:29:52 +00:00
Miek Gieben 11d592bfa7 client.Retry does not do anything
Remove from the struct as it was not implemented.
2013-06-15 20:35:09 +01:00
Miek Gieben f595bf7a06 Set license on test files 2013-05-12 16:09:52 +02:00
Miek Gieben 19d93e2181 Fix it 2013-01-28 21:49:23 +01:00
Miek Gieben 6dfe504a09 small cleanups 2013-01-28 20:41:17 +01:00
Miek Gieben 73b9284ec7 remove dead code 2013-01-28 20:40:41 +01:00
Miek Gieben 23483f7959 Make it compile 2013-01-28 20:32:36 +01:00
Miek Gieben 0dc922a99b Add a ExchangeConn 2013-01-28 20:30:13 +01:00
Miek Gieben c8f880217f Close the connection
Patch from: Alex Sergeyev
2013-01-28 19:27:24 +01:00
Miek Gieben 4ba5ac6863 Remove client.Attempts
Didn't like it anyway and it made the calling logic a mess. So it is
now removed. Failed queries can be redone, but they should be initiated
from the client, not within the library.
2013-01-11 19:20:49 +01:00
Miek Gieben e66c2a1324 m.Size isnt used 2012-12-14 13:33:24 +01:00
Miek Gieben 3609f3e7a5 gofmt -s 2012-12-09 19:07:31 +01:00
Miek Gieben d758825590 more documentation 2012-12-02 10:14:53 +01:00
Miek Gieben 1297852fdc Fix tcp read/writes and client.Attempts
Thanks to a bug report from Vitalie Cherpec which commented that this
didn't work.

The timeout settings we not in the client.attempts loop, so they
were only active for the first attempt. And the loop wasn't broken
out of when the write or read succeeded.

Both these issues are now fixed.
2012-11-22 15:06:21 +01:00
Miek Gieben c7ad10314a Remove the Do function -- easy to do in standard Go 2012-11-19 18:14:09 +01:00
Miek Gieben 33e3a5396e Dont even bother do allocate a channel 2012-11-19 16:55:14 +01:00
Miek Gieben e2ca025569 update documentation 2012-11-19 16:22:54 +01:00
Miek Gieben 5349c3532f Per suggestion of Jan Mercle 2012-11-19 14:43:02 +01:00
Miek Gieben a0b6e30da7 Fix chaos.go for the new api 2012-11-18 13:51:42 +01:00
Miek Gieben 553b780257 Rearrange some comments 2012-11-18 13:28:16 +01:00
Miek Gieben b34501bc1a add remark 2012-11-18 13:12:11 +01:00
Miek Gieben cbf025827a Fix the documentation 2012-11-18 13:03:11 +01:00
Miek Gieben ccaa90b31e Make client.Do() return a channel (ala time.NewTicker)
This new API finally makes sense, and ditches the callback
2012-11-18 12:50:22 +01:00
Miek Gieben 099d0c1fc7 Add exchange structure for the client 2012-11-18 12:33:56 +01:00
Miek Gieben 3c3d2af072 Remove the Rtt variants 2012-11-18 12:29:40 +01:00
Miek Gieben ea947838d8 Do the TCP write in one write
Before the tcp writes were done like NSD does them:
2 bytes length, and the rest of the message.

Now a complete buffer is created with LLMMM...MMM, where
LL is the 2 byte length and MMM...MMM is the message to be send.
This makes the reply faster at the cost of doing a realloc of the
message buffer.
2012-10-17 12:40:57 +02:00
Miek Gieben 1cca340f0b Use attemps also in the dial function 2012-10-17 09:05:26 +02:00
Miek Gieben bf1e1e15dc docs 2012-10-16 19:14:03 +02:00
Miek Gieben 56221057d3 exchangeBuffer was and is not needed 2012-10-16 13:18:59 +02:00
Miek Gieben be0423d80f Tsig for queries is working again 2012-10-16 09:42:38 +02:00