End Google Ads 201810 - BS.net 01 --> Hi all

Im using socket programming to send data from one system to another.im running client and server on both systems.
my problem is when i send a message from client of one system it reaches the server of other system, how to send that recieved
data to localhost client. below is the code:-



client:-

private void sendButton_Click(object sender, EventArgs e)
{
TcpClient socketForServer;
try
{
socketForServer = new TcpClient(_ip of sending machine , 10);

}
catch
{
MessageBox.Show("Failed to connect to server at {0}:999", _machineName);
return;
}
NetworkStream networkStream = socketForServer.GetStream();
System.IO.StreamWriter streamWriter =
new System.IO.StreamWriter(networkStream);
System.IO.StreamReader streamReader =
new System.IO.StreamReader(networkStream);
try
{
streamWriter.WriteLine(this.messageTextBox.Text);
streamWriter.Flush();
this.messageTextBox.Clear();
this.messageTextBox.ReadOnly = true;
this.messageTextBox.Text = streamReader.ReadLine();

}
catch
{
MessageBox.Show("Exception reading from Server");
}
// tidy up
networkStream.Close();

}

Server:-

TcpListener tcpListener = new TcpListener(10);
tcpListener.Start();

while (true)
{
Socket socketForClient = tcpListener.AcceptSocket();
NetworkStream networkStream = new NetworkStream(socketForClient);
System.IO.StreamReader streamReader =
new System.IO.StreamReader(networkStream);
string theString = streamReader.ReadLine();
MessageBox.Show(theString); //message recieved how to send this back to local host
streamReader.Close();
networkStream.Close();
socketForClient.Close();
}