Discussion:
A3: call send() only from sendmore()
(too old to reply)
Martin Karsten
2009-04-01 03:20:34 UTC
Permalink
I keep getting questions about this, so I want to emphasize once more that you
are only allowed to call send() from within sendmore() and only once per
invocation of sendmore(). The infrastructure code might not capture and complain
about all other possible ways of calling send(), but the TA will look at your
code and verify that behaviour.
David Steiner
2009-04-01 20:22:40 UTC
Permalink
Is this also a requirement for a receiver?

As in, are we NOT allowed to call send() from arrival() after receiving a
packet to send an ACK? We have to call unblock() (which then calls
sendmore, then send)???

Thanks,
Dave
Post by Martin Karsten
I keep getting questions about this, so I want to emphasize once more that you
are only allowed to call send() from within sendmore() and only once per
invocation of sendmore(). The infrastructure code might not capture and complain
about all other possible ways of calling send(), but the TA will look at your
code and verify that behaviour.
Martin Karsten
2009-04-01 20:28:22 UTC
Permalink
Ideally, yes. However, I realize that this requirement could have been expressed
more strongly early on, so if you have a working solution and find it difficult
to convert to the expected behaviour, we can negotiate...
Post by David Steiner
Is this also a requirement for a receiver?
As in, are we NOT allowed to call send() from arrival() after receiving
a packet to send an ACK? We have to call unblock() (which then calls
sendmore, then send)???
Thanks,
Dave
Post by Martin Karsten
I keep getting questions about this, so I want to emphasize once more that you
are only allowed to call send() from within sendmore() and only once per
invocation of sendmore(). The infrastructure code might not capture and complain
about all other possible ways of calling send(), but the TA will look at your
code and verify that behaviour.
Loading...