i put a winsock control on both client and server and named them just Winsock then on the server side i have this code that i got from a sample:
VB Code:
Private Sub Form_Load() Winsock.LocalPort = 6000 Winsock.Listen End Sub Private Sub Winsock_ConnectionRequest(ByVal requestID As Long) Winsock.Close connection Winsock.Accept requestID End Sub Private Sub Winsock_DataArrival(ByVal bytesTotal As Long) Dim incommingData As String Winsock.GetData incommingData txtLogin.Text = incommingData End Sub
Then on the client side i have this from the other sample..:
VB Code:
Private Sub winsock_connect() MsgBox "We are connected" End Sub Public Sub cmdLogin_Click() Winsock.RemoteHost = "127.0.0.1" Winsock.RemotePort = 6000 Winsock.Connect Winsock.SendData txtLogin.Text End Sub
Now when I hit "login" i get the message telling me the connection was made but the data doesnt appear to be transferring... i have a text box called txtLogin and it just stays blank.. any ideas?




Reply With Quote