I changed the code a bit
writing:
Code:
if (host == false)
{
clientwriter.Write(textBox_TextWrite.Text);
clientwriter.Flush();
}
if (host == true)
{
serverwriter.Write(textBox_TextWrite.Text);
serverwriter.Flush();
}
reading:
Code:
if (host == false)
{
if (clientreader.EndOfStream == false)
{
textBox_TextRead.Text = clientreader.ReadLine();
}
}
if (host == true)
{
textBox_TextRead.Text = serverreader.ReadLine();
}
But now I know it just stops when it gets to the clientreader.ReadLine(); line. Found that out using the debugger now that I know how to use it