Results 1 to 15 of 15

Thread: winsock help

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    262

    winsock help

    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:
    1. Private Sub Form_Load()
    2.  
    3. Winsock.LocalPort = 6000
    4. Winsock.Listen
    5.  
    6. End Sub
    7.  
    8. Private Sub Winsock_ConnectionRequest(ByVal requestID As Long)
    9. Winsock.Close connection
    10. Winsock.Accept requestID End Sub
    11.  
    12. Private Sub Winsock_DataArrival(ByVal bytesTotal As Long)
    13.  
    14. Dim incommingData As String
    15. Winsock.GetData incommingData
    16.  
    17. txtLogin.Text = incommingData
    18. End Sub

    Then on the client side i have this from the other sample..:

    VB Code:
    1. Private Sub winsock_connect()
    2. MsgBox "We are connected"
    3. End Sub
    4.  
    5.  
    6. Public Sub cmdLogin_Click()
    7. Winsock.RemoteHost = "127.0.0.1"
    8. Winsock.RemotePort = 6000
    9. Winsock.Connect
    10. Winsock.SendData txtLogin.Text
    11. 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?
    Last edited by ooOOJaVaOOoo; Aug 10th, 2005 at 02:08 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