Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SOCKET CONNECTION

 
Gabriel Collet
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have an application where two terminals connect with a socket connection. I've done it pretty much by looking at the Network Demo on the Wireless Toolkit. However, now I need to add a new terminal (two terminals connected to a server). I have no Idea how to do it. Any tips?.

Thanks

By the way. Thanks for your previous answers to all my other questions.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Gabriel"-

We need both your real first and last name. This is more than the third warning. Along with warning about using ALL CAPS TO YELL!.

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well do you have the server up and running and listening for connections? That is really the main point. The example that you have already done is like one device connecting to the Server.

Here's a quick explanation of how Servers are written in Java. The Thread class can be created as a Thread type of "Daemon". What this means is that the Thread is opened and it stays open listening for "calls". When it reaceives a call it usually spawns off a seperate Thread to handle the call.

I hope that helps.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic