I've got a talk application that runs from within VB, and there's a substantial problem with it: I can only receive one message, then no more. No exceptions, no errors thrown, nothing. I can't get to the bottom of it and would appreciate some help. Code is below

vb.net Code:
  1. Imports System.Net
  2. Imports System.Net.Sockets
  3. Imports System.IO
  4. Imports System.Text
  5. Imports System.Threading
  6.  
  7. Public Class frmTalk
  8.  
  9. Dim RemoteIP As String = "127.0.0.1"
  10. Dim Connected As Boolean = False
  11. Dim Client As TcpClient
  12. Dim Listener As TcpListener
  13. Dim t As Thread
  14. Dim objStreamWriter As StreamWriter
  15.  
  16. Private Delegate Sub Invoker(ByVal str As String)
  17.  
  18. Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
  19.     Me.Close()
  20. End Sub
  21.  
  22. Private Sub DoListen()
  23.     Dim strTemp As String = ""
  24.     Listener = New TcpListener(IPAddress.Parse("127.0.0.1"), 65535)
  25.     Listener.Start()
  26.     Do
  27.         If Listener.Pending = True Then Listener.AcceptSocket()
  28.         Dim objClient As TcpClient = Listener.AcceptTcpClient
  29.         Dim objStreamReader As New StreamReader(objClient.GetStream)
  30.         While objStreamReader.Peek <> -1
  31.             strTemp &= Convert.ToChar(objStreamReader.Read).ToString
  32.         End While
  33.         Dim params() As Object = {strTemp}
  34.         Me.Invoke(New Invoker(AddressOf WriteText), params)
  35.     Loop
  36. End Sub
  37.  
  38. Private Sub frmTalk_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
  39.     Connected = False
  40.     prgRecieved.Value = 0
  41.     btnSendFile.Enabled = False
  42.     Try
  43.         t.Abort()
  44.     Catch tae As Exception
  45.         'Ignore error to prevent thread looping
  46.     End Try
  47. End Sub
  48.  
  49. Private Sub ConnectToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ConnectToolStripMenuItem.Click
  50.     RemoteIP = InputBox("Please enter the IP address to connect to", , RemoteIP)
  51.     If My.Computer.Network.Ping(RemoteIP) Then
  52.         t = New Thread(AddressOf DoListen)
  53.         t.Start()
  54.         Try
  55.             Client = New TcpClient(RemoteIP, 65535)
  56.         Catch ex As Exception
  57.             MessageBox.Show(ex.Message)
  58.             Clipboard.SetText(ex.Message)
  59.             Exit Sub
  60.         End Try
  61.         DisconnectToolStripMenuItem.Enabled = True
  62.         ConnectToolStripMenuItem.Enabled = False
  63.         txtMessage.Enabled = True
  64.         txtRecieved.Enabled = True
  65.         btnSend.Enabled = True
  66.         prgRecieved.Enabled = True
  67.         prgRecieved.Value = 0
  68.         btnSendFile.Enabled = True
  69.         Connected = True
  70.         MessageBox.Show("You have successfully connected to " & RemoteIP.ToString)
  71.     Else
  72.         MessageBox.Show("The IP address you entered is invalid or is being blocked by a firewall")
  73.     End If
  74. End Sub
  75.  
  76. Private Sub DisconnectToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisconnectToolStripMenuItem.Click
  77.     Client.Close()
  78.     ConnectToolStripMenuItem.Enabled = True
  79.     DisconnectToolStripMenuItem.Enabled = False
  80.     Connected = False
  81.     tmrRecieve.Enabled = False
  82.     txtMessage.Enabled = False
  83.     txtRecieved.Enabled = False
  84.     btnSend.Enabled = False
  85.     prgRecieved.Enabled = False
  86.     btnSendFile.Enabled = False
  87.     prgRecieved.Value = 0
  88. End Sub
  89.  
  90.     Private Sub btnSendFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSendFile.Click
  91.         Dim ofd As New OpenFileDialog
  92.  
  93.         ofd.Filter = "All files|*.*"
  94.         ofd.Multiselect = False
  95.         ofd.CheckFileExists = True
  96.         If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
  97.             'Code to send file
  98.         End If
  99.     End Sub
  100.  
  101. Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click
  102.     objStreamWriter = New StreamWriter(Client.GetStream)
  103.     objStreamWriter.Write(txtMessage.Text)
  104.     objStreamWriter.Flush()
  105.     objStreamWriter.Close()
  106. End Sub
  107.  
  108. Private Sub WriteText(ByVal str As String)
  109.     txtRecieved.Text &= RemoteIP & " says: " & vbCrLf & str & vbCrLf & vbCrLf
  110. End Sub
  111. End Class