/**
   * Connects to the server.
   *
   * @param serverAddress the address to connect, if null try to use our sip connection address.
   * @throws IOException
   */
  private void connect(String serverAddress) throws IOException {
    if (serverAddress != null) connection = new Socket(serverAddress, 5003);
    else // lets try using our sip connected address
    connection = new Socket(sipProvider.getConnection().getAddress().getAddress(), 5003);

    connectionWriter = new PrintStream(connection.getOutputStream());
  }