DragonFly commits List (threaded) for 2009-12
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: git: network - Move socket from netmsg ext to netmsg header, add port to socket
:+ *
:+ * 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>
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]