Link to home
Start Free TrialLog in
Avatar of galeboe
galeboe

asked on

UNIX NETWORK PROGRAMMING

This question is directed to davidwilliams! I have just viewed a solution to boosta's question about a daytime request service on a remote server. How can I execute this program! I am using Sun Operating system 5.5(Solaris 2.5). What are its typical arguments? How should I compile it and using what? Will gcc compile it?
Avatar of David Williams
David Williams
Flag of Australia image

Hi there!
  Do you have the Question number for that question?  Was it the daytime client program I provided for him?  If so, you certainly can use gcc - you should just need to add -lnsl -lsocket on the compile line
  e.g.   gcc -o daytime daytime.c -lnsl -lsocket

  Then, if you just run the program it tells you the parameters it expects.  I think it was just the hostname to connect to, because the program uses an API call to retrieve the port number for the daytime service.
  Let me know how you get on!
 Ok, I've just looked back through the questions and if the one you're referring to is
  https://www.experts-exchange.com/Q.10109566
then yes, you can call the program presented by passing in the hostname you wish to connect to, and then optionally you can specify a port as well, if you wish.
  Hope it all goes well for you ...
ASKER CERTIFIED SOLUTION
Avatar of David Williams
David Williams
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of galeboe
galeboe

ASKER

I had tried to give you points earlier but these machines could not budge! There you are and an extra 10 for your patience! Thanx a lot!

Galeboe:
<galeboem@hotmail.com>
Why, thank you very much !
I hope the program goes well for you ! :)
Avatar of galeboe

ASKER

davidwilliams, did you actually get the 40 points I intended to give you? On my computer it shows that the question has beeen graded with only 4 points! Do you know what could be wrong?
 I certainly did get the points - many thanks !
  The way Experts-Exchange works is that a question that has been answered can be 'bought' for 10% of the original points awarded.  So, I did get your 40 points, and now the question and answer can be viewed by others at a cost of 4 points to them.