I am tryin to make a simple server and client in vb.net that can connect through a port. I ahve looked around on the internet and have become completely confused. Any help is appreciated. I installed the vb6 socket control but i dont think that is the right way.
Here is wat i have so far:
How do i make an event when a connect attempt is made?Code:Public Class Form1 Dim tcpserver As System.Net.Sockets.TcpListener = New System.Net.Sockets.TcpListener(2999) Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load tcpserver.Server.Listen(5) End Sub Private Sub timeraccept_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timeraccept.Tick tcpserver.AcceptSocket() End Sub End Class




Reply With Quote