I have posted this many times but nobody has replied does anybody know how can i get winsock to make a connection from a program on one computer to another progra on another computer can somebody guide me to do that (i.e connect, accept, ect.)
Printable View
I have posted this many times but nobody has replied does anybody know how can i get winsock to make a connection from a program on one computer to another progra on another computer can somebody guide me to do that (i.e connect, accept, ect.)
I have not done this in a while; however, here is something I hope is help ful.
In vb5 I wrote a chat program for a lan. Most of what you want came from vb help. The way it went was this: one winsock had to be the server and listen for other winsocks trying to connect. In doing so, the client needed to know the RemoteHost of the server (the name of the computer i.e. My Pc or Server or Mikes Computer). The RemotePort and LocalPort had to be set. Then you simply try to connect.
ex.
'm_str_IP is a module level str. var. holding
' the name of the server
With frmClient
!tcpClient.RemoteHost = m_str_IP
!tcpClient.RemotePort = 1001
!tcpClient.LocalPort = 0
End With
I hop this helped!