Posted 24 June 2012 - 01:57 AM
Hey guys, I've made a client-server connection that can represent web-sites (text files that are sent over networks).
To use this, create a file called "server_data" without the quotes, and then fill it with whatever you want on the site (I think that so far, only letters, numbers and maybe punctuation is allowed. If you get an error, that probably means that punctuation isn't allowed) and then after the server_data file is created, launch the server program.
Then, to access that from a client, go on another computer and launch the client program, and then put in the ID of the host, and it'll connect you. Pinging is just a small feature that I made for testing the host.
Server Code: http://pastebin.com/rP5a169D
Client Code: http://pastebin.com/9sHZiVzU
To use this, create a file called "server_data" without the quotes, and then fill it with whatever you want on the site (I think that so far, only letters, numbers and maybe punctuation is allowed. If you get an error, that probably means that punctuation isn't allowed) and then after the server_data file is created, launch the server program.
Then, to access that from a client, go on another computer and launch the client program, and then put in the ID of the host, and it'll connect you. Pinging is just a small feature that I made for testing the host.
Server Code: http://pastebin.com/rP5a169D
Client Code: http://pastebin.com/9sHZiVzU