This is a complex problem that you will need to split into simpler parts with attainable tasks.
Are you successfully send a message to the server and receive a response?
Think about what your messages will look like when they are sent to the server, and received by the client - what is the structure of the data?
How will you represent the "board" and position of the "pieces" on the board on the server? In an array? a map? a database?
How will you represent the same information on the client, not graphically, but in memory.
How will you graphically present the state of the board to the client? (I recommend you start simply with console output to the clients.)
From there, you can start thinking of things like winning conditions, error conditions, illegal inputs, and all the other things that go into creating a game.
Sorry I don't have any code to give you, but I'm sure you can find plenty of examples on google. These are merely the starting points of the thought process that has to go into your somewhat challenging project.
Hope this helps.