Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading/writing file from/into server

Status
Not open for further replies.

Blue4x

Programmer
Aug 11, 2005
2
FI
Hello.

I'm making a game and would like to have hiscore table saved on my own server in the net. However I don't have any knowledge about programming server related things on C++ or (C).

So, could someone enlighten me?

To put this matter in smaller pieces, below are two topics

1) How to connect to a server (and close connection)
2) How to read (and write) file from (into) a server

Answers and exmaple codes highly appreciated.

Thank you.

--
Markus
 
Your questions require an elaborate (read 'exhaustive') answers. It's (almost) like asking how computers work. Maybe this will help?

For first question:
and precisely
For the second one, there are tons of ways of exchanging data with a server.

The easiest is notify the server that you need to read from file "A" located in "Directory" from position X to position Y and then wait for the server to send you the requested data or an error code. Same for writing/creating files. Both of them with respect to the security model of the operating system you are running under.

Considering you understood the basics from the articles listed in the first link, you'd probably want to explore something more...mmm... exquisite, like web services, or (why not?!) .NET remoting (uses managed c++ [wink]).

P.S.: It's not an easy task to understand the network communications inner workings. Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top