Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working with Sockets
#1
Sockets is a way of 2 or more computers comunicating together and i will show you abit about it.

In the first part or Part 1 you will have

Server
Client

The Server can
Accept Connections
Accept Commands

The Client can
Connect
Send Commands

in the next part we will make the server able to send back a command to the client this can be used for example in a login. Your client sends the information to the server, The server then checks the information and sends a green light for the client to login



SOURCE CODE FOR PART 1: <!-- m --><a class="postlink" href="https://dl.dropbox.com/u/12582973/SocketProgrammingPart1.zip">https://dl.dropbox.com/u/12582973/Socke ... gPart1.zip</a><!-- m -->

EXE DOWNLOADS FOR PART 1:
<!-- m --><a class="postlink" href="https://dl.dropbox.com/u/12582973/SocketsPart1.zip">https://dl.dropbox.com/u/12582973/SocketsPart1.zip</a><!-- m -->

How-To:

1: Unzip
2: run SocketTest.sln

This will run both the projects


Please note this part does not include the disconnect so when you close the client or server it will be non responsive (Just click the close button and it will be fine)
Website: <!-- m --><a class="postlink" href="http://www.PBAProductions.com">http://www.PBAProductions.com</a><!-- m -->
E-Mail: <!-- e --><a href="mailtoTongueatrick@AriSystems.Org">Patrick@AriSystems.Org</a><!-- e -->
Skype: Qwaxer
Youtube: Qwaxer
[Image: 2hnx8av.jpg]
#2
Wow! This is pretty cool! Thanks for sharing this! I always thought that using sockets was a lot more complicated than this, but apparently all the functionality lies inside the Socket class.
My Blog | My Setup | My Videos | Have a wonderful day.
#3
Sends command to server and server response to the client


Project Download: <!-- m --><a class="postlink" href="https://dl.dropbox.com/u/12582973/Sockets/SocketProgrammingPart2.zip">https://dl.dropbox.com/u/12582973/Socke ... gPart2.zip</a><!-- m -->

Project Example: <!-- m --><a class="postlink" href="https://dl.dropbox.com/u/12582973/Sockets/SocketsPart2.zip">https://dl.dropbox.com/u/12582973/Socke ... sPart2.zip</a><!-- m -->
Website: <!-- m --><a class="postlink" href="http://www.PBAProductions.com">http://www.PBAProductions.com</a><!-- m -->
E-Mail: <!-- e --><a href="mailtoTongueatrick@AriSystems.Org">Patrick@AriSystems.Org</a><!-- e -->
Skype: Qwaxer
Youtube: Qwaxer
[Image: 2hnx8av.jpg]


Forum Jump:


Users browsing this thread: 1 Guest(s)