Bob Matthews wrote:question 1) how does one embed this code in a large java program at the point where messaging is required ?
question 2) for multiple queues does one change the "queue/queue0" to "queue/queue1" etc.
Bob Matthews wrote:please confirm that in line 34 of the example code queueSender should read queSender
a similar error is to be found in the Receiver code
I still need advice on the code required by the java programs running on Computer 1 (the master computer) at the point where they are waiting to receive a message
How do you code it so that there is a wait until the message is received before continuing with the rest of the code ?
If I adapt two example codes for both a client and a server, is that all I need to do?
I have multiple java programs running on both machines - so how does a message from one computer get to be received by the correct program on the other machine?
how do I change the code in the SocketClient to setup the message I wish to send
e.g. message = "GBPAUD: " + Trading_Decision
where Trading_Decision is a known variable
The corresponding java programs run on both computers hourly
Do I have a timing problem if either the SocketServer starts first or the SocketClient starts first
Bob Matthews wrote:Error message (on Server): Cannot make a static reference to the non-static field server
The second next instruction says "...in a different .java file" BUT I have just the one .java file ?
a single huge .java program
I am wishing to call the SocketServer code on Computer 1 [i.e. call a subroutine from within the main program]
I am wishing to call the SocketClient code on Computer 2
Have you tried to run the code Ron posted? Since that seems to work, I think it might be a good next step to get it to run for you as well.
Paper beats rock. Scissors beats tiny ad.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earthhttps://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter