I have a socket connection: server - single client working fine
I wish to add some extra clients
Each client runs on a separate PC on the same network
All PCs have a large similar java main...
Type: Posts; User: Bob M
I have a socket connection: server - single client working fine
I wish to add some extra clients
Each client runs on a separate PC on the same network
All PCs have a large similar java main...
the stack trace needs to be read from the bottom upwards - see the time stamps
Norm
The first line is NOT missing
there is no variable on line 1720
that line is
server.start();
Here is the full stack trace
2019-06-18 23:00:03 at java.lang.Thread.run(Unknown Source)
2019-06-18 23:00:03 at...
In the calling code on the Client computer (No.2)
do I need to replace "localhost" with the IP address of Computer 1 ?
Bob M
p.s. have just replaced an ethernet cable - now both computers are...
I do not understand you...........
Both PC's are local ?
Does the calling code on the Client side look OK ?
Client error: (hourly)
SocketClient exception occurred: java.net.ConnectException: Connection refused: connect
My understanding is that if a message was successfully received by Computer 1, then the socket would be closed
Thus my prime problem is:- why does the code on Computer 2 (client) not send a...
yes - because my main java program operates on an hourly basis and it is NOT receiving a message from Computer 2
I probably have errors in the code on both sides at the moment but one main problem...
Hi
I have the following code (in my main java programs - which activate every hour on the hour)
Computer 2: (Client)
Calling code:-
// send a message to Computer 1 with your trading...
hi again
I am now going with a non-static solution as follows.........
import java.io.*;
import java.net.*;
public class SocketClient {
can you show me an example of what you are meaning please ?
I spoke too soon....................
Clean compile on Socket Server code but
1 compile error on the Socket Client code
reference to Trading_Decision_2
error] cannot make a static...
I am logged on to Dukascopy's Trading platform where one runs java programs
I have removed () and get a clean compile
Sorry for my bad.........
thank you very much :)
Bob M
New Zealand
Incorporate = add server code (cut and paste) as a subroutine in my large java program and call it when required - on Computer 1
Add client code (cut and paste) as a subroutine in my large java...
Incorporate = add server code (cut and paste) as a subroutine in my large java program and call it when required - on Computer 1
Add client code (cut and paste) as a subroutine in my large java...
the stand-alone example works
it is when I try to incorporate it into my large java program that i have problems
questions:-......................
Is that main in a nested class (you asked)
Does it appear to be in the code I posted ?
Make the class static (you advised)
I added the word 'static' - is...
will do.....
Bob M
Hi
have done that and now on compilation I get 2 problems on amended line
public static class SocketServer() {
Error 1] Syntax error on token "class", @ expected
Error 2] Syntax error,...
yes - compilation errors
3 problems (3 errors)
2019-06-06 15:26:00 ---------- ...
Hi
I have the following code which runs successfully as a stand alone example
when I try to incorporate it into my java program I get an error message
Error message (on Server): Cannot make...
In a word - No!
The first iteration (time interval) is perfect
Thereafter it is all wrong
p.s. normally I wouldn't worry about repeating code over and over but the classifier LibSVM has a...
Initially, the 'fc' forms part of the once-only code and so is encapsulated within this code
But I am using fc..... outside this {}
I therefore took the fc definition line out of the once-only...
hi Norm
When I encapsulate the red code in a once-only loop I run into problems............
the very next line of code is fc.buildClassifier(training);
but the 'fc' no longer is in scope ???...