Client change socket port

Page 1 of 1

1 Replies - 144 Views - Last Post: 03 May 2013 - 02:27 PM Rate Topic: -----

#1 psh  Icon User is offline

  • D.I.C Head

Reputation: -3
  • View blog
  • Posts: 65
  • Joined: 25-March 13

Client change socket port

Posted 03 May 2013 - 02:24 PM

How i can change my socket port so i can connect to another server .?


  public static void main(String[] args) throws IOException {
      
        Socket s = new Socket("localhost", 2200);
      
        PrintWriter pw = new PrintWriter(s.getOutputStream());
        Scanner rs = new Scanner(s.getInputStream());
        
        pw.println("hello");
        pw.flush();
        System.out.println(rs.nextLine());
    }





Is This A Good Question/Topic? 0
  • +

Replies To: Client change socket port

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10445
  • View blog
  • Posts: 38,682
  • Joined: 27-December 08

Re: Client change socket port

Posted 03 May 2013 - 02:27 PM

This is getting a little ridiculous. You have opened multiple threads on the same topic in the past 48 hours. I don't think you need another.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1