venerdì 30 settembre 2016

Day 170: A working connection

Today I finally managed to connect a client with a server.
To do so I added commands to the shell. By typing \server a server is created and vice versa.

I also removed the Server and Client classes by replacing them with the ServerSocket and ClientSocket. I'll have to think carefully about where I want to have the network logic. Right now it is in a Network class, but that's not a definitive solution.

I also wrote some ugly-looking code to obtain an error message from WinSock2 when something goes wrong, so I will have access to very important information during developement.

In the picture, on top, a server is created, then in the bottom process a client is created, and finally the server accept the connection.




Nessun commento:

Posta un commento