I finally found the inspiration to start blogging again. Yes its Github pages. I’ve found out its a great tool for blogging paired with jekyll, so I am moving this blog. Follow it here – http://indradhanush.github.io/
My college Wi-Fi signal fluctuates frequently and I having been using Linux Mint 13. The problem is that I get logged out automatically. In the absence of the traditional IDM that I had been using while on Windows, downloading large files became difficult. Often the download would stop at close to 90 %. Argh! Annoyed I used to be with the fluctuating signals. But this was something not in my hand. So I decided to do something that was in my hand. I checked out for download managers and came to know that Chrome for Linux didn’t support download managers. And after scouring through the net a little came the savior!
It’s a command line utility and the best I’ve seen so far. To install it you should issue the following command :
sudo apt-get install wget
Enter Your Password. Wait for the installation to finish.
All you need to do is to obtain the download link and then use this in a terminal to start the download :
wget -c http://manet.eurecom.fr/das.pdf
Bingo! wget downloads the file for you. Works like a charm! More options can be specified that can be viewed by typing :
One last thing. Although I’ve not tried it yet. I saw that wget is also available for Windows follow the following link : http://www.gnu.org/software/wget/
Who needs a GUI when command line works best!
This one right here is my first post on this blog. This is about my first mini-project which I completed on my own over the last few days. I’ve developed an Online Tic-Tac-Toe game that can be played by two players sitting at different computers but within the same network.
I implemented the basics of socket programming to employ the reliable Client-Server model. Connecting the two players across the internet is simple. One of the players must decide to play as the server and create a game at the server itself such that the second player may connect to the server’s IP address. Yes, the client must be aware of the server’s IP address.
I wrote this in C++. Currently the source codes have been compiled for Linux systems. Here’s what the server(Player 1) needs to do to set up a game :
./server.out (Yes! That’s it!) server.out is the compiled output file for creating the server.
And connecting to the server is also pretty easy. The client(Player 2) should type in –
client.out is the compiled output file for connecting to the server and 192.0.2.80 is the IP address of the server(say). Given a server has already been set up, the client should be able to connect comfortably to the server.
I have uploaded this project at github. And here is the link to the repo :
Their are loads of stuff that still needs to be done. I shall list them in decreasing order of my preference:
- Implementing the more modern and better approach of using getaddrinfo() to fill out the structures. I’ve hard coded them manually.
- Extending support to IPv6 address family.
- Incorporating an in-game chat feature that will allow the players to freely interact with each other.
- Compiling the code for Windows users.
- Achieving cross platform portability.