I worked on a program that uses databases to send small messages from one PC to another. What I did was put the database in a shared folder, connect the program to it on another PC (via Path, no less), and there it is a simple and easy way to receive messages from a PC. online. Not the best option, but it's just homework, and a quick and dirty approach gave me an assessment.
But now the homework is done, and I would like to improve what I did. A problem with the program is being deployed. Too many folders / installation paths and administration / sharing issues related to direct access to the database in the shared folder.
So, the good people here at stackoverflow advised me to try Socket Programming, which I think is a bit out of my league. But you never know ...
In addition, I know the difference between programming Sync and Async sockets. One block, the other not. The program I'm working on is a simple turn-based game, so I thought Synchronous might be good enough, because if it’s not your turn, you really can’t do anything. However, the problem is that the program is considered as "non-responsive." I tried asynchronously, but ran into problems with threads, something that I find WAY out of my league.
Logically, the program is simple. One host, one client. When a client connects, the host sends data. Then the client receives, sends its own data. And so on, until one player loses.
Sorry, only .NET 2.0 is installed in my school. No WCF or anything else. In addition, this should be done in C # Windows Forms, so XNA is missing.
So, I would like to ask ... is there an easy way to get into Socket Programming? Any guides / sample projects that might help? Pre-prepared codes that can be learned and adapted?
Most of the samples that I found and adapted are chat applications, which I thought were good enough, but making it modular just breaks it down.