Click to See Complete Forum and Search --> : Calling Remote C function


Deepak
November 24th, 1999, 10:32 AM
Hi All,
I have a server process(on UNIX-C) is running in background.

Now On some occasion my Java programs(clients ,which are on different locations on network) need to send
some notification to server ,like if clients are saying that we have
finished.Server will do his job after receiving the notification.

Now the thing is how Java program will notify to C
program.The solution is whenever client want to notify the server invoke any Servers-C functions with the help of
JNI.After getting the notification server will do rest of his job.

Problem is as I have mentioned ,clients(Java programs) are on different machine so how can they invoke the C
function of server.As I know, for using the JNI all the Java and native codes should be on same machine.

What is the solution of this problem?.What technique should I adopt for this?.

Is there any other mechanism to send notification from Java program to C program.Like signals in C.

Hoping a prompt reply.


Deepak

cactus25
February 23rd, 2000, 10:32 AM
What about having your C program listen on a socket?

Your java clients can then just connect to that socket, send the notification, close the socket and be done.

It isn't always as simple as it sounds, but I think that could work for you.