Many thanks to Tim and Ron (esp. for your patience)
I was mistakenly sending a null message - hence the error
I now have everything working
Sockets and thread are all new territory for me
A final question:
Suppose I add another two clients to the mix
The server starts its background thread very early on in the main java program
The clients start their background threads after a lot of calculations
Thus the server is listening before the clients are sending their messages
Is there a simple way to code such that the server waits until it has received all 3 messages from the three clients (one message each)
before it continues to make its FINAL overall trading decision based on all 4 individual trading decisions (3 clients and itself) ?
Hopefully, without involving any new concepts such as schedulers
Bob M
Dunedin
New Zealand