BP Forums
Working with Sockets - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55)
+--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56)
+---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8)
+----- Forum: Code Snippets (https://bpforums.info/forumdisplay.php?fid=18)
+----- Thread: Working with Sockets (/showthread.php?tid=560)



Working with Sockets - xolara - 07-12-2012

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)


Re: Working with Sockets - brandonio21 - 07-12-2012

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.


Part 2 - xolara - 07-16-2012

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 -->