Results 1 to 9 of 9
Thread: how to connect two servers??
- 03-28-2010, 09:59 AM #1
Member
- Join Date
- Mar 2010
- Posts
- 5
- Rep Power
- 0
- 03-28-2010, 12:00 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,385
- Blog Entries
- 7
- Rep Power
- 17
- 03-28-2010, 12:31 PM #3
Member
- Join Date
- Mar 2010
- Posts
- 5
- Rep Power
- 0
server only passing the clients message from 1 client to another simultaneously....
- 03-28-2010, 04:34 PM #4
- 03-28-2010, 05:07 PM #5
Member
- Join Date
- Mar 2010
- Posts
- 5
- Rep Power
- 0
t depends on the implementation. a server can also broadcast a message to all connect
i want to braodcast message to clients connected to another server of same kind..how to do that?
- 03-28-2010, 06:45 PM #6
the pseudo-code sound like:
1) when a client connect to the server then the server register this connections in a thread-collection and creates a new thread to handle that connection
2) when a client send a message to the server, the server add the username + " says: " + message to the string message and then loops through his threads-collection and for each client he executes a client[x].send(message);
if you want to broadcast clients connected to another server then you need a reference to the collection of all clients from the other server.
- 03-28-2010, 06:49 PM #7
Member
- Join Date
- Mar 2010
- Posts
- 5
- Rep Power
- 0
ya..i got what u r saying!!! that means that the another server will deal the first server as a client!!
- 03-28-2010, 06:54 PM #8
sure, if the "other" server is able to broadcast you can connect as a client and when you send a message to the "other" server all connected clients to the "other" server should receive your message. so you don't need to know anything about the client-collection on the "other" server.
- 03-28-2010, 06:59 PM #9
Member
- Join Date
- Mar 2010
- Posts
- 5
- Rep Power
- 0
Similar Threads
-
Copy files between servers
By mcoto800 in forum Java ServletReplies: 1Last Post: 02-05-2010, 01:05 AM -
subforum for servers
By tushar88 in forum Suggestions & FeedbackReplies: 3Last Post: 03-10-2009, 02:25 AM -
[SOLVED] connecting two servers at atime
By sandeepsai39 in forum JDBCReplies: 3Last Post: 02-25-2009, 05:56 AM -
Servers supporting EJBeans
By ravian in forum Enterprise JavaBeans (EJB)Replies: 3Last Post: 01-03-2008, 10:44 AM -
Looking for servers on ports
By Java Tip in forum Java TipReplies: 0Last Post: 12-13-2007, 09:28 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks