Results 1 to 6 of 6

Thread: Socket's ports

  1. #1
    Rose88 is offline Member
    Join Date
    Apr 2009
    Posts
    19
    Rep Power
    0

    Default Socket's ports

    how can I add outgoing and entering ports per Socket?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,331
    Rep Power
    25

    Default

    Are you talking about the Socket class? Or the ServerSocket class?
    What constructors or methods does it have that you have questions about?

  3. #3
    Rose88 is offline Member
    Join Date
    Apr 2009
    Posts
    19
    Rep Power
    0

    Default

    I'm talking about the Client Socket! I've been asked to connect clients with each other (in a circle )and each client has 4 ports:
    1. permanent outgoing port
    2. permanent entering port
    3. remote outgoing port
    4. remote entering port
    and I don't have any code .I'm supposed to write it!!!

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,331
    Rep Power
    25

    Default

    Not sure what you mean by "Client Socket".
    The two main classes dealing with sockets are the Socket and ServerSocket class.
    What is the significance of "permanent" and "remote" ports?

  5. #5
    Rose88 is offline Member
    Join Date
    Apr 2009
    Posts
    19
    Rep Power
    0

    Default

    I have a class called Client! this client has socket..
    the client supposed to have 4 ports (I guess each port should has a socket).
    the remote port should use RMI protocol to connect with other remote port in other client.

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,331
    Rep Power
    25

    Default

    Use Socket to connect and send to another site.
    Use ServerSocket to wait for another site to connect to you.

    Haven't used RMI much.

Similar Threads

  1. Question About Using Serial Ports
    By GoodAsh03 in forum New To Java
    Replies: 3
    Last Post: 07-28-2009, 05:11 AM
  2. opening ports
    By prashant in forum Networking
    Replies: 2
    Last Post: 03-22-2009, 08:23 PM
  3. Looking for servers on ports
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-13-2007, 09:28 AM
  4. How to know the ports opened by JVM
    By sandeepspatil in forum Advanced Java
    Replies: 1
    Last Post: 08-02-2007, 01:51 PM
  5. Ports In Java
    By Peter in forum Advanced Java
    Replies: 2
    Last Post: 07-02-2007, 06:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •