944,018 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 17582
  • C++ RSS
Dec 30th, 2006
-1

C++ socket programming

Expand Post »
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!!!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
DynamitMsk is offline Offline
14 posts
since Dec 2006
Dec 30th, 2006
0

Re: C++ socket programming

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
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: move up n down
Next Thread in C++ Forum Timeline: Best way to learn





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC