Sub TCPSocket_Connected (Successful As Boolean)
If Successful = False Then
ToastMessageShow("Connection Failed",False)
End If
Dim tw As TextWriter
Dim StringIn As String
tw.Initialize(TCPSocket.OutputStream)
tw.WriteLine(TCPPacketToSend)
tw.Flush
'tw.Close ' this will allow the server to receive command
Dim tr As TextReader
tr.Initialize(TCPSocket.InputStream)
StringIn = tr.ReadAll
Msgbox(StringIn,"")
TCPSocket.Close
End Sub