C++ socket programming

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2006
Posts: 14
Reputation: DynamitMsk is an unknown quantity at this point 
Solved Threads: 0
DynamitMsk DynamitMsk is offline Offline
Newbie Poster

C++ socket programming

 
0
  #1
Dec 30th, 2006
Hello,

I'm working on a stock trading assignment. I have developed the algorithm for trading, and now I need a little help on getting the data from a server.

There's a server that replies to the following request:
servername stockcost <stockname>

and I assume I can use it like:

int currentCost = servername stockcost <stockname>;

but I do need some way to connect to the server, so there should be some CPP libraries. Anyone can point me to places where I can get more info on working with a remote machine in CPP? thank you!!!
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,051
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: C++ socket programming

 
0
  #2
Dec 30th, 2006
I don't really know that much about sockets, so I may be wrong. I haven't been able to find any C++ network stream sockets, however there's plenty in C which you can call from your program. If you want to learn socket programming from scratch, start with Beej's Guide To Network Programming.

You may find the low-level coding difficult. If so, you may want to make the procedure easier by using libcurl which isn't as powerful, but it's fine for retrieving HTML and other files from a web server.

Hope this helps
"Technological progress is like an axe in the hands of a pathological criminal."
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC