We've run into an interesting issue using the Dial APIs: We want to
use DialTCP because we want to bind to a specific outgoing interface
by specifying laddr, but we also want to dial with a timeout because
the remote end might be down. There doesn't seem to be any way to do
this at present.
Maybe all the Dial<Proto> functions could also take a timeout? Or
maybe the distinction between Dial and DialTimeout actually needs to
go away and all Dials should have a timeout?
Thoughts?
Regards
Albert
Russ Cox
未读,
2012年2月21日 14:10:502012/2/21
回复作者
登录即可回复作者
转发
登录即可转发
删除
您无权在此群组中删除帖子
复制链接
举报消息
显示原始帖子
要么此群组的电子邮件地址为匿名状态,要么您得查看成员电子邮件地址权限才能查看原始帖子
收件人 Albert Strasheim、golang-dev
I think this might have to wait until after Go 1. You can work around the problem by dialing in a goroutine and using select to choose between the dial finishing and a timer firing.