Wrox Programmer Forums
|
Pro Java Expert level Java questions not about a specific book. Please indicate your version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro Java section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 21st, 2006, 02:14 AM
Registered User
 
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default p2p chat

Hi,
first i'd like to say hello to the community
secondly i'd like to say sorry for the english errors i will do (i'm french)

i'm desperate searching code, or tutorial for making a chat applet.
Not a simple chat applet with socket and serverSocket(i know how to do that ..)
but a peer to peer chat WITHOUT a server .
the chat applet is for an internet web site, so simply doing multicast is also a bad idea :( (i think, if i'm wrong please, correct me)
Maybe it's easy, simply tell all clients to be serveur, but i'm confused .
if i had 50 client, must all the 50 be 1 server and be in the same time client to the 49 other ?!?
it's the only idea i have, and i think this will be hard, beacause
1 serverSocket = 1 thread
1 Socket (client) = 1thread
so if ther are 50 clients, this will be 50 threads
if anyone could help, it would be great.

in hope of a response, thanks ...

 
Old July 21st, 2006, 10:53 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Impossible. Java applets can only connect to their originating host, aka the server they're served from.

http://www.innovation.ch/java/HTTPClient/security.html

Jon Emerson
http://www.jonemerson.net/
 
Old July 24th, 2006, 01:22 AM
Registered User
 
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

well when i signed my applet i can connect other hosts.
I can perfectly read stream from other http server for exemple

 
Old July 24th, 2006, 02:47 PM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oops! Good catch. Sorry for the mistake -- at least my link clarified things appropriately. Did you manage to get a P2P chat client implemented?

Jon Emerson
http://www.jonemerson.net/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Voice Chat (P2P or client server??) truthseeker88 C# 4 September 25th, 2010 09:50 AM
P2P Chat Application S1v C# 5 August 26th, 2006 02:44 PM
P2P Tim20 C++ Programming 3 March 8th, 2005 05:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.