Results 1 to 20 of 20

Thread: [2003] tcp client and server

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2007
    Posts
    47

    [2003] tcp client and server

    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:

    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
    How do i make an event when a connect attempt is made?
    Last edited by qazwsx; Nov 4th, 2007 at 08:14 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width