bind()
system call was not normally needed in client software. Why not?
Why is it needed for a server? NB: What this question is asking,
in part, is what bind()
actually does
-- if you understand this, you should know the answer.
listen()
call important?
read()
system call specifies a maximum
number of bytes which may be read from a socket. Do you think it
can return less than this? Under what circumstances? What if the
write()
system call returned a different value
from that given in its length argument?
Even if you nothing whatsoever about Java, can you suggest what this line of code does? How does it compare to the "C" code described in the lecture? For real Java whizkids: why wouldn't you normally write a program containing a line like this?mySock = new Socket("www.latrobe.edu.au", 80);
accept()
system call returned a new socket. How
is this used, and why is it a pretty nifty trick? Note: the answer
is not at all obvious. Java experts might like to
discover how Java uses threads to handle this
situation.