aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes Pls anyone answer this, its urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Pls anyone answer this, its urgent" Watch "Pls anyone answer this, its urgent" New topic
Author

Pls anyone answer this, its urgent

sankar singh
Ranch Hand

Joined: Aug 17, 2007
Posts: 40
can any one resolve this?

I have few clients, Lets say ClientA, ClientB and ClientC and a ServerSocket program(port opened ex ort no.4545)

My Question is

ClientA has to send message to server but it should not receive any response from server

ClientB has to send message to server but it should not receive any response from server

Here,

ClientC has to receive message from server, whatever server sends;

so there are 2 clients have to send message to server and reply has to be received by 3rd client(ClientC).

So server has to do the following job

1. receive messages from 2 clients and response should go to 3rd client

ClientA program has written in Oracle

ClientB program has written in Oracle

ClientC program has written in Java (Socket)

ServerSocket program has written in Java (no need to mention)


Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8924
    
    9

Please don't ask the same question more than once. It causes confusion and duplication of effort as the community tries to help everyone.
While you are waiting for an answer, you may want to read our FAQ, How To Ask Questions On JavaRanch, in particular, the entries EaseUp and Patience Is A Virtue.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
How does the server tell the clients apart? Maybe C could connect to the server first with a request that says "SUBSCRIBE", something like ...

I'd be tempted to say C is not a client at all, but another server. Then we'd remove the "subscribe" message from the logic, and connect to C every time we want to send a message:

You wouldn't really need to connect to C inside the loop, but that would handle any broken connections, perhaps if C had to stop and restart.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
sankar singh
Ranch Hand

Joined: Aug 17, 2007
Posts: 40
Originally posted by Stan James:
How does the server tell the clients apart? Maybe C could connect to the server first with a request that says "SUBSCRIBE", something like ...

I'd be tempted to say C is not a client at all, but another server. Then we'd remove the "subscribe" message from the logic, and connect to C every time we want to send a message:

You wouldn't really need to connect to C inside the loop, but that would handle any broken connections, perhaps if C had to stop and restart.



Dear Stan James,
I am happy to see your reply, thanks a lot. my problem is " 'N' number of clients can connect from Oralce(client program) to send message to server(ServerSocket, port 4747). But only my client(java program) has to connect server port and read message from that port. Rest of all clients have to send message to the port 4747.
Can you pls give some tips to resolve this?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pls anyone answer this, its urgent