Communication between two clients

In Java Networking, communication between server-client or bwtween server-multiple clients is general. But How will be the communication between two cients, means two clients can send & receive messages to & from each other(being guided by server).

Sorry,
I didn't get your reply clearly.
I want, if Server is running, and two clients(two instance of a same program) are opened, whatever message(string)client1 send to Server,then the Server needs to send those to client2.Again, the some response should come from client2 to client1 thru Server.
How can I implement this?
If you have idea, or some sample code about this, please let me know.
Regards.

Similar Messages

  • [urgent]communication between two client.

    currently i am developing an online game, i only own one computer at home,so i got a problem of how to make two client connected together?in case, there is a lot of clients here,now i wish that client1 do something, client2 will see it, how this can be done, how my server program tackle client1 and client2's IP address, so that client2 only communicate to client1 but not the other client? can please have any guidance on it. i really headache about this problem. please help. can i have some any simple example code to help me had better understanding on this problem? thanks a lot

    well,you best don't let the client comunication each other
    because the client open up some port and listening will got some problem
    the custom solution is through the server , all client must be through the server to communicate
    client1 <---> server <---> client2
    if client1 connected to server ,and the server will take some
    information ( client1's ip , username etc.) to the database.
    client1 and server will keep connection
    when the client1 is connected to server ,it will got the information about client1 , of course server also
    take the information as client1's to the database,at this time,the client1 will get the client2's information
    then,finished the client's information exchanged

  • Communication set up between two clients

    All,
    I am trying to set up distributed WM using SAP R/3 systems. For this i have choosen client 805 (Central ERP R/3) and client 800 as decentralized WM system which is also R/3. i have completed the configuration for decetral-WM both in Central and D-WM systems and the consistency checks are fine. using SM59 i have set up R/3 systems communication profiles for the above two clients.
    But the IDOCs showing a statsu-03 in central system  in BD87 (client 805) not showing up in D-WM system.  i believe the tRFC set up is missing something. Both the clients are in the same ERP instance. Can any one please let me know the steps to set up communication between two clients running from the same oracle SAP instance and same database. ( I am trying to exchange Communication documents which are relevant to Decentralized WM). Will apprecaite any help.
    Thanks.

    Please try using commit statement after triggering the Idoc from client 805 (Central ERP R/3) . This should work.

  • Communication between two jvm (client and server)

    Hi ,
       I want to access the UME service of the SAP J2EE Container using a stanalone client application.
    So the client would be running on remote JVM.
    Here we use the JNDI service to communicate between the client and server.
    p.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");
                        p.put(Context.PROVIDER_URL, providerURL.trim());
                        p.put(Context.SECURITY_PRINCIPAL, securityPrinciple.trim());
                        p.put(Context.SECURITY_CREDENTIALS, securityCredentials.trim());
                        Context ctx = (Context) new InitialContext(p);
                        Object objRef = ctx.lookup(ejbName.trim());
    I want to know that is the communication between the client and server secured in this scenario
    Best Regards
    Manoj

    Okay, the client and server VMs are different implementations of the Hotspot engine. Hotspot basically takes the Java bytecode from your .class files and turns it into native machine instructions at runtime. (The optimizations are actually much more complex than that, but that's the basic concept.)
    The client VM is so named because it's designed to be used for GUI-type applications interacting with the user. It is designed to have a quicker startup and smaller memory footprint.
    The server VM uses more memory and is typically slower at starting up than the client VM, but can often perform ridiculously fast. This of course depends completely on the particular code being run, and you should probably profile and see which VM works better for your application.
    Some interesting optimizations are performed by the 1.4.1 server VM, such as: removal of array-bounds checks (when it determines that the index can't become out of bounds), inlining of methods, and more.
    Here is a link to more info if you're interested:
    http://java.sun.com/products/hotspot/docs/whitepaper/Java_HotSpot_WP_Final_4_30_01.html

  • Connection between two clients

    Hi,
    I want to get some guidance on connection between two clients. Suppose I need to connect client 500 with client 900 in the same system without changing the logical names.
    Thanks & Regards
    Nabarun

    Nabarun -
    It almost sounds as if you just want an RFC to go from one client to the other.  RFCs (SM59) are not client dependant so you can create one in any client.  You can create one with the system name and point it to the client number using a specific user and password.  I would recommend for security it be a communications user and not a dialog user depending on what you will be sending between the clients.  However, the user will need the correct permissions and again, depending on what you are trying to accomplish, it may have to be a DIAG user although I would be wary.  Then create a 2nd RFC pointing back to the other client.  For example...
    RFC 1
    System Name = <System>
    Client = 500
    User = <userid in clnt 500>
    RFC 2
    System Name = <System>
    Client = 900
    User = <userid in clnt 900>
    Then when you are in client 500, there is a path/connection to client 900 via that clients ID and password and vice versa using the appropriate RFC.  Again, with out more info on what you are attempting, this may be your solution.  Hope this helps.  Good luck
    Regards,
    Zecher

  • Communication between two portlets - Java Portlet JSR168

    Communication between two portlets
    Hi All,
    i want to be question how do communication between two portlets. Exam:
    I have 2 portlets in a portal together: a Menu portlet & a Content portlet, now i want when i click to an link of portlet Menu then my Content portlet will get param from link that.
    i'm develop by Oracle Jdeveloper tool & OracleAS 10g.
    Thank a lot !

    Hello,
    I assume you are not using Weblogic Portal, correct? If you are using Weblogic Portal, you could use events to communicate between two JSR168 portlets, but this only works in Weblogic Portal.
    If you are not using Weblogic Portal, the only way to communicate between two JSR 168 portlets is to put an attribute in the session in one portlet, and retrieve it from the session in the other portlet. For example, to set a value in your Menu portlet, given a javax.portlet.PortletRequest variable "request", and an object you want to send to the content portlet in the variable "menuChoice":
    javax.portlet.PortletSession session = request.getPortletSession(true);
    session.setAttribute("menuChoice", menuChoice, javax.portlet.PortletSession.APPLICATION_SCOPE);
    Then, in your content portlet to retrieve the value of the menuChoice variable you would do this:
    javax.portlet.PortletSession session = request.getPortletSession(true);
    Object menuChoice = session.retAttribute("menuChoice", javax.portlet.PortletSession.APPLICATION_SCOPE);
    Kevin

  • Communication between two Macs Server

    Communication between two Macs Server:
    Can they work together and communicate and interact normally in a PowerMac network, OS X 10.5.8 Server installed, and a MacPro computer that is running Server 4.0.3 on Yosemite? Had to do some additional implementation?
    Regards

    from the JavaDocs:
    http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContext.html
    getContext
    public ServletContext getContext(java.lang.String uripath)
    Returns a ServletContext object that corresponds to a specified URL on the server.
    This method allows servlets to gain access to the context for various parts of the server, and as needed obtain RequestDispatcher objects from the context. The given path must be begin with "/", is interpreted relative to the server's document root and is matched against the context roots of other web applications hosted on this container.
    In a security conscious environment, the servlet container may return null for a given URL.
    Parameters:
    uripath - a String specifying the context path of another web application in the container.
    Returns:
    the ServletContext object that corresponds to the named URL, or null if either none exists or the container wishes to restrict this access.
    See Also:
    RequestDispatcher

  • Communication between Two WebLogic instances on the same machine

    Hi,
    We're having a problem with communication between two copies of Weblogic on
    the same machine. They are configured with seperate ports (regular and SSL).
    Independantly, they run fine. I can access EJBs running on either of them.
    The problem is that a bean in one of them has code which attempts to access
    an EJB on the other one. The procude fails when trying to obtain the initial
    context. This same code works if compilied independantly of WebLogic on the
    same machine.
    Are there any known issues regards communication between two running
    instances of Weblogic on the same machine?
    Thanks in advance,
    Randy Yarger
    marchFIRST
    [email protected]

    Thanks for the prompt reply.
    There is one IP address (internal address 10.227.1.34) one the machine. WLS1
    is set up at ports 7001 and 5133. WLS2 is setup at ports 7004 and 7005.
    When WLS1 attempts to obtain a context to WLS2 with the URL
    t3://10.227.1.34:7004/ it pauses for a long period of time. Running truss
    on the both WLS processes shows communication occuring between the two
    followed by long periods of silence. Finally WLS2 spits out the error
    ConnectionException[7001,7001,5133,5133,7001,7001] (paraphrased, I can get
    the entire error if it would help).
    After another long pause, WLS1 quits trying with the error 'Server
    10.227.1.34:7004 not found' (again paraphrased).
    Among the things we've tried:
    * Changing the URL from the IP to 127.0.0.1
    * Enabling/disabling SSL on either or both WLSs.
    * Changing the server name in WLS2's copy of weblogic.properties from
    'myserver' to 'myserver2' (previously they were both 'myserver')
    * Upgrading WLS2 to 5.1.0sp5 (Tried upgrading WLS1, but was getting class
    not found errors and quit because that WLS is being used by other people)
    This is a Solaris server. WLS1 is running 5.1.0 and WLS2 is running 5.1.0sp5
    Any suggestions would be appreciated.
    Best,
    Randy Yarger
    marchFIRST
    [email protected]
    "Michael Girdley" <[email protected]> wrote in message
    news:[email protected]...
    >
    >
    There should not be. What is your network configuration? Are they on
    separate IP addresses?
    Thanks,
    Michael
    Michael Girdley
    BEA Systems Inc
    "Randy Jay Yarger" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    We're having a problem with communication between two copies of Weblogicon
    the same machine. They are configured with seperate ports (regular andSSL).
    Independantly, they run fine. I can access EJBs running on either of
    them.
    The problem is that a bean in one of them has code which attempts toaccess
    an EJB on the other one. The procude fails when trying to obtain theinitial
    context. This same code works if compilied independantly of WebLogic onthe
    same machine.
    Are there any known issues regards communication between two running
    instances of Weblogic on the same machine?
    Thanks in advance,
    Randy Yarger
    marchFIRST
    [email protected]

  • Communication between two MVC's

    Hi.
    I want a communication between two MVC's, offcourse in one project.
    What I have:
    MainWindowView (MVC)
      |
      +--> MenuView (MVC)In my Menu MVC there is a button Logout. When this one is pressed the model had to tell the MainWIndowView that he can close.
    How can I do this?
    Statix.

    I have a solution... but I don't know if this is a neat one..
    This is my MenuModel:
              case 3:
                   MainWindowController.closeMainWindow();
                   LoginModel loginModel = new LoginModel();
                   LoginController loginController = new LoginController(loginModel);
                   break;
              ...This one communicates directly with a public static void closeMainWindow () method which disposes the view (JFrame)
         public static void closeMainWindow (){
              mvcView.dispose();
         }     Is this a solution so I stick to the MVC pattern??? I hope so... I wouldn't know another way...
    Thanks in advance!

  • Error 2032 in communication between Flex Client and WCF

    Hi All,
    I'm trying to establish communication between Flex Client
    and WCF service.
    WCF service accepts gZip compressed data and returns gZip
    compressed results.
    So I used Flex ByteArray.compress() and
    ByteArray.uncompress() for this purpose. However, it throws error
    2032.
    The gZip compression/decompression uses MemoryStream class in
    C#. Based on my previous experience, memory stream communication
    between Flex and C# gives erro 2032.
    Is there a work around for this?
    Thanks,
    Vishal

    I read some thread in the forum, and found somebody had the similar problem with me. Just want to know how to settle this problem.
    In the client/server program. Client is a JAVA program and Server a
    VC++ program. The connection works, and the problem appears after some time. The Client sends a lots of requests to Serverm, the server seems receive nothing. But at the same time, the server is able to send messages to Client. The Client also can get the messages and handle them. Don't understand why there this problem and why it appears when it wants.
    The client is a Win2k platorm with JDK1.3.1 and the server is also a Win2K platform with VC++ 6.0.
    In the Client, using:
    inputFromServer = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    outputToServer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())),true);
    Hope can get your help.

  • RFC BETWEEN  TWO CLIENTS IN DEVELOPMENT

    hi everyone,
    here connection is already exists in between two clients(development) now i have to transfer ztable from client 1 to client2.
    if any body have the steps and code please guide me.
    Best regards,
    Sunil

    Hi,
    Log on to your destination client (where the form doesn't yet exist).
    Transaction SE71, menu option Utilities -> Copy from Client.
    Fill in the name of the form, the client number where it already exists, and the name of the copy (it can be the same of different to the existing form).
    Execute.
    This will prompt for a package for your new form, which can be different to the original.
    Job done.
    Regards,
    Nick

  • Using 1394 to perform communication between two PCs

    Hi all,
    Does anybody knows how to use a 1394 (firewire) to implement a communication between two computers using Labview ?
    Do I need a special toolkit for this ?
    Thanks
    Eduardo

    Currently, if you have installed NI-VISA, you should have the 1394 Passport already installed and running. This gives you the ability to communicate with 1394 instruments via your 1394 instruments. This is important because this helps determine how you will communicate from one computer to another. If you want to use the VISA and communicate using the FireWire INSTR, then you need to find or create drivers for your 1394 ports that allow you to communicate with them as 1394 instruments. There might be other ways to do this, but this is probably the most simple. Once you've got the pcs set up, you can just use VISA to communicate with your other devices.
    Logan S.

  • A point to point communication between two EJB

    How do we make a point to point communication between two ejb? Must i use mdb or session bean?
    Because i have a problem: how can i send a message to a specific EJB that i choose?
    Thanks

    Yes....U should post a message from EJB1 to a queue and listener can be the second EJB (Better if its an MDB).
    Whats the problem U r facing?
    -Rais

  • Data mismatch between two clients

    Hi,
    I have a query on data mismatch between two clients.
    For eg assume a functional consultant would have configured intially some 5 custom document types and captured that in a transport request (TR1234) and promoted from one system/client (in my case QG1/821) to another system/client (say QG4/821). Again he would have configured another 3 custom document types and put in a transport request (TR4567) and promoted it. The transport request TR4567 some how did not reach QG4/821. Hence it shows only 5 records in T003 table (document types table) in QG4/821 and 8 records in QG1/821. How do we identify which is the correct transport (in this case TR4567), so that this transport can be promoted to QG4/821, so that both QG1/821 and QG4/821 are in sync.
    Similary such a discrepancy exists for custom tables also. I am not able to catch hold of any basis people for inputs on this. Hence pls advise.
    Regards
    Vimal Kumar

    development objects can be compared using, Compare the active versions in both the system. (Use remote comparision)
    But this you have to maually check.

  • Communicating between two javafx files

    hi,
    i have two javafx files and i want the two to communicate
    that is on pressing a button in one i want the control to be transffered to the other...
    Hw can i do this,
    can any one help

    Hi,
    If you mean communicating between two database, you can create DATABASE LINK.
    http://download.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_5005.htm
    Thanks

Maybe you are looking for