Results 1 to 13 of 13

Thread: mswinsck just isnt working..

  1. #1

    Thread Starter
    Member bizzyVB's Avatar
    Join Date
    Jun 2001
    Location
    Florida
    Posts
    38

    Angry mswinsck just isnt working..

    alright well here's the scoop. last night i started programming a winsock application. then all of a sudden i tried to connect. when i couldnt connect and went back in the code and found nothing wrong. so i tried again, and still it didnt work. so i decided to start over and it still didnt work. the only time the mswinsck worked for me was when i loaded the old applications that used the ocx. to try and fix it i replaced the old mswinsck with another one i downloaded from a website. that still didnt work. does anybody know what the problem seems to be?







    thanks,
    -bizzy

  2. #2
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    When you say it does not work does not connect. Are you getting an error message? Does it time out?

  3. #3

    Thread Starter
    Member bizzyVB's Avatar
    Join Date
    Jun 2001
    Location
    Florida
    Posts
    38
    cool west palm bch. same here !

    well anyways when i connect it doesnt show an error message so i guess it does timeout.

  4. #4
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    Cool West Palm. Is it a server / client app? I know that sounds dumb, but i might just be a server serving up. If so Post your connection Code for the Client and your receiving connection for your server.

  5. #5

    Thread Starter
    Member bizzyVB's Avatar
    Join Date
    Jun 2001
    Location
    Florida
    Posts
    38
    'here's the client code

    Private Sub Command2_Click()
    winsock1.RemoteHost = "" + Text4.Text + ""
    winsock1.RemotePort = 1234
    winsock1.Connect
    End Sub

    Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
    If winsock1.State <> sckClosed Then winsock1.Close
    winsock1.Accept requestID
    End Sub

    Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    Dim strdata As String
    winsock1.GetData strdata
    data.Text = strdata
    End Sub

    'and the server code

    Private Sub Form_Load()
    winsock1.LocalPort = 1234
    winsock1.Listen
    End Sub

    Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
    If winsock1.State <> sckClosed Then tcpserver.Close
    winsock1.Accept requestID
    End Sub

    Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    Dim strdata As String
    winsock1.GetData strdata
    data.Text = strdata
    End Sub

    its just a simple server / client app, i use the same code for all my winsock apps but still i dont know why its connecting.

  6. #6

    Thread Starter
    Member bizzyVB's Avatar
    Join Date
    Jun 2001
    Location
    Florida
    Posts
    38
    *not connecting

  7. #7
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    Looks fine. Hey
    winsock1.RemoteHost = "" + Text4.Text + ""
    Why are you adding Nothing there. Try to add the ip address, hard code it in there see how it works.

  8. #8

    Thread Starter
    Member bizzyVB's Avatar
    Join Date
    Jun 2001
    Location
    Florida
    Posts
    38
    ok so i did that..now it says error, address in use..

  9. #9
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    Are you testing on the same system. Client and server. if so just use the 127.0.0.1 ip address.

  10. #10

    Thread Starter
    Member bizzyVB's Avatar
    Join Date
    Jun 2001
    Location
    Florida
    Posts
    38
    but i am using the local ip address.. (127.0.0.1)..

  11. #11
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    Let me create something here. Also try the winsock app that www.vbworld.com has. It' s pretty good.

  12. #12

    Thread Starter
    Member bizzyVB's Avatar
    Join Date
    Jun 2001
    Location
    Florida
    Posts
    38
    looks like i got it working. i restarted my computer and fixed the registry so i guess it had some registry problem. thanks anyways!

  13. #13
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    Cool.

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