Sub mySocket_Connected(Successful As Boolean)
If Successful Then
myAsync.Initialize(mySocket.InputStream,mySocket.OutputStream,"mySocket")
btnWiFi.Enabled =False
If pnlWiFi.Visible =True Then pnlWiFi.Visible =False
Else
mySocket.Close
btnWiFi.Enabled =True
End If
End Sub
Sub mySocket_NewData(Buffer() As Byte)
Dim mLine As String
Dim v As Int
mLine = BytesToString(Buffer,0,Buffer.Length,"UTF-8")
If mLine="good" Then
'bConnect=True
btnWiFi.Enabled=False
Else If mLine.SubString2(0,3) ="key" Then
v= mLine.SubString(mLine.Length-2)
slKey.SetValue(v)
End If
End Sub