Socket Connection VB.NET

02/15/2012 13:34 -Legor-#1
Hello, i'm trying to connect my software at metin2's server, with socket connection.
But I do not know when i err..
This is the code:
Code:
Dim query As String = "@SHOWMETHEMONEY.@EVENT TEST 1."
        Dim host As IPAddress = Nothing
        Dim mySock As Socket = Nothing

        Try
            If Not IPAddress.TryParse("5.100.136.100", host) Then
                MessageBox.Show("This IP is not valid")
                Exit Sub
            End If

            Dim ep As IPEndPoint = New IPEndPoint(host, Integer.Parse(30000))
            mySock = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)

            mySock.Connect(ep)

            If mySock.Connected Then

                mySock.Send(Encoding.ASCII.GetBytes(query))

                MsgBox("Sended!")
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
Everything works perfectly, the connection is made, I receive the message "sended", but i have not consequences ingame.

Can you help me?

Up! :(