Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function ConnectThread:Object(data:Object)
- stream = OpenTCPStream("www.unrealsoftware.de", 80)
- If Not stream Then
- Print "Failed to connect ("+last_ms+")"
- End
- End If
- If TCPStreamConnected(stream) Then
- Print "CONNECTED!! ("+last_ms+")"
- End
- Else
- Print "Disconnected ("+last_ms+")"
- End
- End If
- End Function
- Function Connect()
- CreateThread ConnectThread, Null
- End Function
- Global start_ms = MilliSecs()
- Global last_ms
- Global stream:TTCPStream
- Connect()
- Repeat
- Local current_ms = MilliSecs() - start_ms
- If current_ms <> last_ms Then
- last_ms = current_ms
- If stream And TCPStreamConnected(stream) Then
- Print "Proccess complete! app is already connected ("+last_ms+")"
- Print "Waiting for app terminate"
- Else
- Print "Connecting ("+last_ms+")"
- End If
- End If
- Forever
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement