0

I am trying to use socket IO from a >NET windows server. The same code works perfectly from windows forms.

Declaration:

Public socketIO As Quobject.SocketIoClientDotNet.Client.Socket

Code:

 Try
        Dim O As New IO.Options
        O.AutoConnect = True
        O.IgnoreServerCertificateValidation = True
        socketIO = IO.Socket("http://XXXXXX:8000", O)
        'socket = IO.Socket(Socket_Server & ":" & Socket_Server_Port, O)
        socketIO.On(socketIO.EVENT_CONNECT, Sub()
                                                socketIO.Emit("unique", MemCPUID)
                                            End Sub)
        socketIO.On(socketIO.EVENT_RECONNECT, Sub(data)

                                              End Sub)
        socketIO.On(socketIO.EVENT_MESSAGE, Sub(data)

                                            End Sub)
        socketIO.On(socketIO.EVENT_ERROR, Sub(data)

                                          End Sub)

        socketIO.On(socketIO.EVENT_CONNECT_ERROR, Sub(data)

                                                  End Sub)
        socketIO.On("CON", Sub(data As String)
                               Sresp(data)
                           End Sub)
    Catch ex As exception
    End Try

The Catch dosn't get hit and scoketIO connected=False Also the events never fires.

The exact same code run from windows forms runs perfectly. Already tried to disable firewall. Any ideas?

0

1 Answer 1

0

The problem was with a wrong version DLL I was using. Everything is working fine now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.