Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

The best approch on applet to server communication  RSS feed

 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

My task is to get an applet to send and recieve data from a server on a specific port. What is the best approch on recieving and sending data?

1. Open a socket to server send or recive data and close the socket?
2. Open a socket to server. Let the connection be open until the applet closes/ terminates?

What is the best approach?

I will send data almost every second from and to the applet. Is Object reader and writer the stream to use or how do I get all the data from and to the applet.

Images, text, x and y positions.

// Mathias
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!