Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Process_Globals
- Dim Socket1 As Socket
- End Sub
- Sub Globals
- End Sub
- Sub Activity_Create(FirstTime As Boolean)
- Activity.LoadLayout("mainlayout")
- Socket1.Initialize("Socket1")
- Socket1.Connect("54.*.*.*" , 8383, 20000)
- End Sub
- Sub Socket1_Connected (Successful As Boolean)
- If Successful = False Then
- Msgbox(LastException.Message, "Error connecting")
- Return
- End If
- Dim tr As TextReader
- tr.Initialize(Socket1.InputStream)
- Dim sb As StringBuilder
- sb.Initialize
- sb.Append(tr.ReadLine) 'read at least one line
- Do While tr.Ready
- sb.Append(CRLF).Append(tr.ReadLine)
- Loop
- Msgbox("Time received: " & CRLF & sb.ToString, "")
- Socket1.Close
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement