title: TCP between two computer in a diffrent network using Java
body: <p>I wrote a Server-Client chatprogram that lets you send messages between two Computer in the same Network. Now im trying the get it work if the computer are in diffrent networks. I already cofigured my router to forward request with a cetain port to my pc. I am guessing that the client pc also needs to do this? 
  To connect the client I use this code:</p>
  
  <pre><code>static Socket smtpSocket = null;
  smtpSocket = new Socket();
  smtpSocket.connect(new InetSocketAddress("-Server IP-", Port));
  </code></pre>
  
  <p>Server:</p>
  
  <pre><code>echoServer = new ServerSocket();
  echoServer.bind(new InetSocketAddress("-Server IP", Port));
  </code></pre>
  
  <p>to send/receive data I use a PrintStream/DataInput Stream on both side:</p>
  
  <pre><code>is = new DataInputStream(clientSocket.getInputStream());
  os = new PrintStream(clientSocket.getOutputStream());
  </code></pre>
  
  <p>But nothing happens.
  Do I have to configure the PrintStreams to send Data to the specic Computer?</p>