Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet socket programming

 
akalanka de silva
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey i want to connect serverSocket and Socket in two machine by the applet any ideas if u have pls send me.most i like to source code.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't open a ServerSocket in an applet unless the applet is digitally signed. Once that's taken care of and the policy files are configured, it's no different than opening a ServerSocket in any other Java program.

You can study Part III of the Java Plug-in Programing Guide to learn about signed applets, and here's a networking tutorial to learn about Java sockets in general.
 
Emmy Rauch
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your question isn't clear, but if you have an application running a ServerSocket you can connect to it from an Applet using Socket IF the application is running on the same computer as the webserver that is hosting the applet. If you are looking to send data between two applet you will need to make some sort of server program to accept multiple connections, and have each user (running an Applet) open a Socket to this server.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic