Sub AppStart (Form1 As Form, Args() As String)
Start
End Sub
Sub Start
Dim sock As Socket
sock.Initialize("Socket")
sock.Connect("192.168.1.71", 6009, 0)
Wait For Socket_Connected (Successful As Boolean)
If Successful Then
Log("Connection successful")
Dim astream As AsyncStreams
astream.Initialize(sock.InputStream, sock.OutputStream, "Stream")
Sleep(5000)
Log("Send data")
astream.Write("I come from b4j".GetBytes("UTF8"))
astream.SendAllAndClose '<------- If i comment this line, text are not sent
End If
End Sub