Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim AStreams As AsyncStreamsSSL
Dim Socket1 As SocketSSL
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
Socket1.Initialize("Socket1")
End Sub
Sub Socket1_Connected (Successful As Boolean)
Log(Successful)
If Successful = False Then
Log(LastException.Message)
Return
End If
AStreams.Initialize(Socket1.InputStream, Socket1.OutputStream, "AStreams")
ConnectToServer
End Sub
Public Sub ConnectToServer
Socket1.Connect("ssl-eu.astraweb.com" , 443, 20000)
End Sub
Sub AStreams_NewData (buffer() As Byte)
Dim msg As String
msg = BytesToString(buffer, 0, buffer.Length, "WINDOWS-1252")
Log(msg)
End Sub