For testing purposes, a bc server will be running on the host named
bear.cs.usna.edu, listening on port 34567.
banshee$ fna bear.cs.usna.edu 34567 ← we specify the host+port for the bc_server
2*x
0 4 8
4.000000
x^2+5*x-10
1 8 8
38.000000
s(x)
0 3.14 30
0.615136
^C
Notice that program behavior is identical to Lab 9! The only thing that will have changed is that the process running bc will be located on a separate host and communication will be via sockets instead of pipes. This new version will require the user to specify the name of a host on which a bc server is running, as well as a port number to connect to.
Here are some additional examples of how your fna program should behave when it is used incorrectly, i.e. when it encounters some sort of error:
banshee$ fna Usage: fna <hostname> <port> banshee$ fna chessie Usage: fna <hostname> <port> banshee$ fna cheesy 34567 Couldn't get host entry. banshee$ fna chessie 345 connect() error. banshee$ fna chessie 34567 socket() error. banshee$ fna chessie 34567 sigaction() error.
lab13, and that
it contains your completed fna.c file.
Make sure that file contains your name and alpha!
Submit the lab13 directory via the usual submit
script. If you finish during lab, please demonstrate your
working program to your instructor.