Re: git: network - Move socket from netmsg ext to netmsg header,

看板DFBSD_commit作者時間16年前 (2009/12/09 04:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/11 (看更多)
:+ * :+ * XXX :+ */ :+void :+sosetport(struct socket *so, lwkt_port_t port) :+{ :+ so->so_port = port; :+} :+ : :Err. What's the XXX for? : :Aggelos It's a reminder to me to deal with the issue of when the port has to change... for example, if a TCP connection is disconnected and connect() is then run on it again to a different target. Or when connect() is used with UDP, or sendto(). There are issues with those sorts of things where we do not have a proper abstraction for the case where the port is moved. I did some very basic work in the netmsg function dispatch code to check the so->so_port and re-forward the message if it had been sent to the wrong port (on the assumption that the message was racing a port change), but it isn't formalized enough or well-tested enough to be considered stable. Hence the XXX. Ok, I was a little sparse in my code comment :-) -Matt Matthew Dillon <dillon@backplane.com>
文章代碼(AID): #1B7hV8we (DFBSD_commit)
討論串 (同標題文章)
完整討論串 (本文為第 6 之 11 篇):
文章代碼(AID): #1B7hV8we (DFBSD_commit)