Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to send data to different socket id via single port?

843790Dec 17 2008 — edited Feb 16 2009
Hi,

I wrote a program, java server and C client.

I have 2 C clients and both connected with same server Ip (192.18.112.12) and port (9001).

here my problem is,


If I want to send a string to specific C client, how i send from java server prg using socket connection.

for example, client 1 have socket id 2001 and client 2 have socket id 3001,

if I want to send one string to socket id 2001 and next string to socket id 3001, how can I send it from java end.

is there any way?.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 16 2009
Added on Dec 17 2008
8 comments
469 views