   Sockets in VB .net
  I tried to create a simple program that sets up a connection using sockets and sends/reads a message. Here is the code, what am I doing wrong? It seems that it is not reading the message.Imports System.IOImports System.NetImports System.Net.SocketsPublic Class Form1    Dim localAddr As IPAddress = IPAddress.Parse("127.0.0.1")    Dim listener As New TcpListener(localAddr, 8080)    Dim client As New Net.Sockets.TcpClient    Dim streamText As StreamReader    Dim strMessage As String    Dim thrListen As New Threading.Thread(AddressOf Start)    Dim testConn As New TcpClient()    Dim outgoing As StreamWriter    Dim strText As String    Dim strNetwork As NetworkStream    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load   thrListen.Start()   connect()    End Sub    Private Sub Start()   Try  listener.Start()  Console.WriteLine("listener started")  client = listener.AcceptTcpClient()  Console.WriteLine("client initiatied")  streamText = New StreamReader(client.GetStream())  Console.WriteLine("stream initialized")  strMessage = streamText.ReadLine  Console.WriteLine("message read in")  Console.WriteLine(strMessage)  TextBox1.Text = strMessage   Catch er As Exception  Console.WriteLine(er.Message)   End Try    End Sub    Private Sub connect()   strText = "Test"   testConn.Connect(localAddr, 8080)   Console.WriteLine("testconn Connected")   outgoing = New StreamWriter(testConn.GetStream(), System.Text.Encoding.UTF8)   Console.WriteLine("outgoing initialized")   outgoing.Write(strText)   Console.WriteLine("Message sent")    End Sub    End Class