Hi I'm trying to create a socket connection to my server, but there's something that does not work. Connection works fine, no error achieved but no reaction for the commands. Anybody could help? Thanks in advance, MfG :)
bumping thread, nobody knows the answer?
Code:
Dim query As String = "@SHOWMETHEMONEY.@EVENT TEST 1."
Dim host As IPAddress = Nothing
Dim mySock As Socket = Nothing
Try
If Not IPAddress.TryParse("192.168.1.102", 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