[go-nuts] cgo multiple definition errors

2017-10-13 Thread 'Pushkar' via golang-nuts
I was getting the multiple definition error when I put my C files in the same directory as my go files. Only after reading some online posts I figured I should put my code into a separate directory. The introductory page to cgo doesn't mention this. It would save newbies some time if did: https

[go-nuts] Blocking in C functions called from go

2017-10-13 Thread 'Pushkar' via golang-nuts
I need to call some C functions from Go. I think I know how to proceed using cgo. However, I was wondering how goroutines and blocking calls in the C functions work together. So in the below example (pseudocode) will the goroutine be suspended when the pthread_lock call is waiting to acquire the

[go-nuts] Re: DNS Resolver options

2017-10-11 Thread 'Pushkar' via golang-nuts
Thanks Dave. I am aware of that repo but it doesn't provide an abstraction of the resolver functionality. I found https://github.com/bogdanovich/dns_resolver which is written using miekg/dns. It is lacking some of the options that libraries like c-ares have (using TCP and controlling timeout). I

[go-nuts] DNS Resolver options

2017-10-11 Thread 'Pushkar' via golang-nuts
Hello, I would like to control the dns lookup timeout, the number of retries and also the ability to use TCP for the DNS resolution. I am from the C/C++ world and c-ares has options to control these. I am not findiing either of these as options in the go net package. Am I not looking in the right