Java Advanced Imaging - Imaging Client Server application

Hello,
I try to send images compressed from a server to a client, the first Image is received by the client, but nothing append after.
The client send an error that says that the socket connection is closed and I don't know wky !
I am using "JAI" for the image compression on the server and I use the method ImageCodec.createImageEncoder(OutputStream dst, ImageEncodeParam param)
OutputStream is the data stream between the client and the server, I have used DataOutputStream and OutputStream object but I got the same error.
(In an example of JAI they use FileOutputStream, I just change it for OuputStream in order to send data on the socket).
ImageEncodeParam is null.
I use an other socket that permits to launch commands through text command. So text commands and data are on 2 differents sockets.
Every time the client ask to the server for an image and the client wait for the stream data.
I know that it could be easer using RMI but it will be better for me to use a stream.
Could you tell me what way should I take, Could you show me an example?
Thank you in advance,
Regards.

This has nothing to do with imaging.
You are sending something via a socket and that is the problem.
The most likely problems:
1. You are sending/reading text not binary.
2. You are sending data not a message (a message contains data) and thus have no way to determine when the actual message has arrived.
3. You are just doing something wrong with your socket code.

Similar Messages

  • Client Server Application with images or icons

    I made a Client Server application with JFrames, but I put a jLabel with an icon, and I can't run the Client.
    It says java.lang.NullPointerException
    Do you know why I can't see the icon in the JLabel? It isn't an applet, it's an application with JFrames.

    You have to explain the problem better if you want some help. Also show the code which is giving you the nullpointerexception(Do not forget codetags!).

  • Need HELP in JAVA ( client /server application )

    hi there ,
    I need the following codes in java for my client/server application . which i can use to perform certain function on another computer on LAN. This is part of my semester project . I would really appreciate if any one can help me
    ->Open/close the CD-ROM once or in intervals (specified in seconds).
    ->Swap mouse buttons the right mouse button gets the left mouse button's functions and vice versa.
    ->Start optional application.
    ->Play optional sound-file.
    ->Point the mouse to optional coordinates.
    ->Shutdown the system, logoff the user etc.
    ->Mouse can be controlled on the target computer with remote mouse.
    ->Keys (letters) on the keyboard can be disabled.
    ->Increase and decrease the sound-volume.
    ->Listen for keystrokes and send them back to you!
    I would really appreciate if some1 can help me find these codes in java
    thanx
    Alamzaib Shafi
    [email protected]

    Dude, if you did your own homework once in a while you'd be able to handle your own semester project. I hope you fail your class and get kicked out of the program. One less idiot with a diploma competing with us hackers for the tech jobs.
    You are indeed a most worthy recipient of my unemployed angst.

  • Advanced Client Server Application

    Hi friends .I'm working on a client server project.In this project I must use two OBJECTOUTPUTSTREAM and OBJECTINPUTSTREAM.But in the program one of them lock the program.
    This code a part of from my code.
    input1 and input2 a ObjectInputStream.
    There are two serversocket in the server side.
    Client side got two socket and connected server's two sockets.
    Sockets had an objectoutputstream and an objectinputstream.
    This project about a game .But players can talk to each other.
    input1 send the game move to another player.
    input2 send the chat message to anoyher player.
    But program always wait the input1 after wait input2.As soon as one of the player moves or seend message another side must take it same time
    I can't do this.
    do{
    move=*this*.input1.read();
    // this wake for move and lock the program here.program doesn't go down.IT'IS A PROBLEM
    message=(String)*this*.inputi2.readObject();
    }*while*(!str.equalsIgnoreCase("Kapat"));
    I thought very much about it.I think I must use a thing lile listener whitch run as soon as objectoutput write to input.
    I'm waiting for your help.If you show a sample code about this subject I pleased very much.
    Good luck everone.Herkese iyi �anslar.this explanation isn'about code and it's my own language.
    TÜRKÇE
    �nsan�n ana dili gibisi yok.Bu aç�klamay� Ba�taki ingilizcede sonra yapt���m için bu dili bu güne kadar geli�tirip gelen tüm türk milletinden özür diliyorum.Amac�m istedi�ime ula�mak ve bu siteyi ziyeret edenlerin % 99 ingilizce kulland��� için böyle yapmak zorunda kald�m.Kusuruma lütfen bakmay�n.
    K�sace özetlemek gerekirse uygulamamda Farkl� socketler üzerinden birbirine ba�l� 2 OBJECTINPUTSTREAM ve OBJECTOUTPUTSTREAM var
    bunlar�n ikisindende kar��l�kl� ver aktar�yorum .biri oyun hamlesi ta��mak di�eride mesaj ta��mak için.Ama bunlardan biri program� blokluyor di�eride orogram inemiyor.Bu sorunu çözmeliyim.
    do{
    move=*this*.input1.read();
    // Hamleyi beklemeye ba�lad���zaman bir mesaj gelince buraya inmiyor illaki hamleyi bekliyor.
    //Hamle geldikten sonrada bu sefer mesaj� bekliyor hamleyi alm�yorr.Bu sorunu halletmem laz�m.
    message=(String)*this*.inputi2.readObject();
    }*while*(!str.equalsIgnoreCase("Kapat"));
    Listener gibi bir �ey kullan�rsam sorun çzülür san�r�m.Yard�mc� olursan�z minnettar olurum.

    I'll go further than that. I'd say that these days, any time you have any kind of client/server application, the first question you should ask is, is there any pressing reason why we can't just use a web server for the server do all communication over HTTP using a textual serialization mechanism like XML and preferably using REST?
    The documentation and infrastructure for this stuff is so extensive these days, and the potential for repurposing is so great, that going any other way without a good reason is a waste of effort. Even if HTTP/REST/XML isn't an exact fit, it can still be worth it (at least for prototyping) just for the convenience.

  • Client/server application under development

    Hi there,
    I've been working on a client/server application that includes chat and whiteboard features. In terms of how the client app communicates with the server app, my initial thought was to just go with xml, until I reached a snag. Everything about chat and almost everything that is accomplished on the whiteboard can be expressed in terms of text or character data; which what makes xml a good candidate for moving the data back and forth from client to server. However, there's one part of the whiteboard feature that can't be converted to just text. The whiteboard has an ImageTool. With it you can select an image (gif,jpg) from your harddrive and load it into the whiteboard. An image is binary data and simply cannot be put into an xml file for transport. At least, that's my understanding. Am I wrong about this?
    So, this poses the questions: "How do other similar applications like MSN Messenger move images around? If they're not using xml as there medium, what are they using? Just plain sockets without any structured medium like xml?"
    Please advise,
    Alan

    You could always Base64 encode the image file content and then put the Base64 in XML.
    I am in the middle of a client-server project and I use XStream ( http://xstream.codehaus.org/ ) to convert Objects to XML automatically. I don't have to do any explicit encoding - XStream does it all for me.

  • How to call Oracle Report 6i from a java swing/ejb codes (client server)

    Hi to all.
    We now have to do reports using Oracle Reports that have to call from Java Swing (interface) / EJB (Backend).
    How can we call the Oracle Reports 6i from Java Swing?
    Do anybody done that?...Any ideas? Where should we find the resourse, if any?
    Thanks in advance and best wishes to all,
    Rushdan.

    Hi,
    6i
    1) One way
    Runtime.getRuntime().exec("rwcli60 report=test.rdf .... server=server_name ...<cmd line params>...");
    2) From swing, open a browser and submit request programmatically
    Re: Calling reports6i reports from java swing client serve application
    Thanks
    Ratheesh

  • HELP - problem in running SSLSocket client/server application

    Hi,
    I want to create a SSLSocket based client/server application for this i have used EchoServer.Java and EchoClient.Java files. Both files are successfully compiled and when i ran EchoServer it throws an exception "Server certificate not found".
    I want to make a complete auto-controlled client/server application which will automatically gets certificate and all configuration itself from program because i will use both client and server application in as a servlet part.
    I did as per following instructions:
    -Create a keystore to hold the private and public keys for the server. e.g.
    keytool -genkey -keystore mykeystore -alias "myalias" -keypass "mysecret"
    -Export the X509 certificate from this store
    keytool -export -alias "myalias" -keystore mykeystore -file mycertfile.cer
    -Import this into a trustStore for the client
    keytool -import -alias "myalias" -keystore mytruststore -file mycertfile.cer
    -Run the server using the keystore
    java -Djavax.net.ssl.keyStore=mykeystore -Djavax.net.ssl.keyStorePassword="mysecret" EchoServer
    -Run the client using the truststore
    java -Djavax.net.ssl.trustStore=mytruststore -Djavax.net.ssl.trustStorePassword="mysecret" EchoClient localhost
    EchoServer.Java
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintStream;
    import java.net.Socket;
    import javax.net.ssl.SSLServerSocket;
    import javax.net.ssl.SSLServerSocketFactory;
    public class EchoServer {
    public static int MYECHOPORT = 8189;
    public static void main(String argv[]) {
    try {
    SSLServerSocketFactory factory =
    (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
    SSLServerSocket sslSocket =
    (SSLServerSocket) factory.createServerSocket(MYECHOPORT);
    while (true) {
    Socket incoming = sslSocket.accept();
    new SocketHandler(incoming).start();
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(30);
    class SocketHandler extends Thread {
    Socket incoming;
    SocketHandler(Socket incoming) {
    this.incoming = incoming;
    public void run() {
    try {
    BufferedReader reader =
    new BufferedReader(new InputStreamReader(incoming.getInputStream()));
    PrintStream out =
    new PrintStream(incoming.getOutputStream());
    boolean done = false;
    while (!done) {
    String str = reader.readLine();
    if (str == null)
    done = true;
    else {
    System.out.println("Read from client: " + str);
    out.println("Echo: " + str);
    if (str.trim().equals("BYE"))
    done = true;
    incoming.close();
    } catch (IOException e) {
    e.printStackTrace();
    EchoClient.Java
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintStream;
    import java.net.InetAddress;
    import java.net.Socket;
    import java.net.UnknownHostException;
    import javax.net.ssl.SSLSocket;
    import javax.net.ssl.SSLSocketFactory;
    public class EchoClient {
    public EchoClient(){}
    public static final int MYECHOPORT = 8189;
    public static void main(String[] args) {
    /*if (args.length != 1) {
    System.err.println("Usage: Client address");
    System.exit(1);
    String sAddress="localhost";
    InetAddress address = null;
    try {
    //address = InetAddress.getByName(args[0]);
    address = InetAddress.getByName(sAddress);
    } catch (UnknownHostException e) {
    e.printStackTrace();
    System.exit(2);
    Socket sock = null;
    try {
    sock = new Socket(address, MYECHOPORT);
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(3);
    SSLSocketFactory factory =
    (SSLSocketFactory) SSLSocketFactory.getDefault();
    SSLSocket sslSocket = null;
    try {
    sslSocket =
    (SSLSocket) factory.createSocket(sock, args[0], MYECHOPORT, true);
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(3);
    BufferedReader reader = null;
    PrintStream out = null;
    try {
    reader = new BufferedReader(new InputStreamReader(sslSocket.getInputStream()));
    out = new PrintStream(sslSocket.getOutputStream());
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(6);
    String line = null;
    try {
    // Just send a goodbye message, for testing
    out.println("BYE");
    line = reader.readLine();
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(6);
    System.out.println(line);
    System.exit(0);
    } // Client
    Can anybody will please help me to solve my problem i am using JDK1.4.2_07
    Thanks in advance.

    Hi,
    I want to create a SSLSocket based client/server application for this i have used EchoServer.Java and EchoClient.Java files. Both files are successfully compiled and when i ran EchoServer it throws an exception "Server certificate not found".
    I want to make a complete auto-controlled client/server application which will automatically gets certificate and all configuration itself from program because i will use both client and server application in as a servlet part.
    I did as per following instructions:
    -Create a keystore to hold the private and public keys for the server. e.g.
    keytool -genkey -keystore mykeystore -alias "myalias" -keypass "mysecret"
    -Export the X509 certificate from this store
    keytool -export -alias "myalias" -keystore mykeystore -file mycertfile.cer
    -Import this into a trustStore for the client
    keytool -import -alias "myalias" -keystore mytruststore -file mycertfile.cer
    -Run the server using the keystore
    java -Djavax.net.ssl.keyStore=mykeystore -Djavax.net.ssl.keyStorePassword="mysecret" EchoServer
    -Run the client using the truststore
    java -Djavax.net.ssl.trustStore=mytruststore -Djavax.net.ssl.trustStorePassword="mysecret" EchoClient localhost
    EchoServer.Java
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintStream;
    import java.net.Socket;
    import javax.net.ssl.SSLServerSocket;
    import javax.net.ssl.SSLServerSocketFactory;
    public class EchoServer {
    public static int MYECHOPORT = 8189;
    public static void main(String argv[]) {
    try {
    SSLServerSocketFactory factory =
    (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
    SSLServerSocket sslSocket =
    (SSLServerSocket) factory.createServerSocket(MYECHOPORT);
    while (true) {
    Socket incoming = sslSocket.accept();
    new SocketHandler(incoming).start();
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(30);
    class SocketHandler extends Thread {
    Socket incoming;
    SocketHandler(Socket incoming) {
    this.incoming = incoming;
    public void run() {
    try {
    BufferedReader reader =
    new BufferedReader(new InputStreamReader(incoming.getInputStream()));
    PrintStream out =
    new PrintStream(incoming.getOutputStream());
    boolean done = false;
    while (!done) {
    String str = reader.readLine();
    if (str == null)
    done = true;
    else {
    System.out.println("Read from client: " + str);
    out.println("Echo: " + str);
    if (str.trim().equals("BYE"))
    done = true;
    incoming.close();
    } catch (IOException e) {
    e.printStackTrace();
    EchoClient.Java
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintStream;
    import java.net.InetAddress;
    import java.net.Socket;
    import java.net.UnknownHostException;
    import javax.net.ssl.SSLSocket;
    import javax.net.ssl.SSLSocketFactory;
    public class EchoClient {
    public EchoClient(){}
    public static final int MYECHOPORT = 8189;
    public static void main(String[] args) {
    /*if (args.length != 1) {
    System.err.println("Usage: Client address");
    System.exit(1);
    String sAddress="localhost";
    InetAddress address = null;
    try {
    //address = InetAddress.getByName(args[0]);
    address = InetAddress.getByName(sAddress);
    } catch (UnknownHostException e) {
    e.printStackTrace();
    System.exit(2);
    Socket sock = null;
    try {
    sock = new Socket(address, MYECHOPORT);
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(3);
    SSLSocketFactory factory =
    (SSLSocketFactory) SSLSocketFactory.getDefault();
    SSLSocket sslSocket = null;
    try {
    sslSocket =
    (SSLSocket) factory.createSocket(sock, args[0], MYECHOPORT, true);
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(3);
    BufferedReader reader = null;
    PrintStream out = null;
    try {
    reader = new BufferedReader(new InputStreamReader(sslSocket.getInputStream()));
    out = new PrintStream(sslSocket.getOutputStream());
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(6);
    String line = null;
    try {
    // Just send a goodbye message, for testing
    out.println("BYE");
    line = reader.readLine();
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(6);
    System.out.println(line);
    System.exit(0);
    } // Client
    Can anybody will please help me to solve my problem i am using JDK1.4.2_07
    Thanks in advance.

  • Problem using the File Dialog Box in a Client/Server application

    I am developping a client-server application using Labview 5.1 . The application on the server acquires data from some instruments and saves it on file, while the application on the clients displayes such acquired data. For doing this I call some routines on the server via the "Open Application vi" (remote connection). All goes well except when I open on the server the "File Dialog Box vi" : in this case the application on the clients is blocked (is blocked the execution of the called vi on the server). Only when
    the File Dialog Box on the server is closed, the execution of the called vi on the server starts again.
    I need to use the File Dialog Box on the server, but I don' t want to stop at the same time
    the clients !!
    I need help for resolving such problem.
    Many thanks in advance !!!

    Hi!
    waldemar.hersacher wrote:
    "It seems that the VIs called by the clients are running in the user interface thread.
    A call to the file dialog box will call a modal system dialog. So LV can't go on executing VIs in the user interface thread."
    Are you sure? I think, that File Dialog, called by LabVIEW File Dialog from Advanced File Functions Palette doesn't blocking any cycles in subVI, which running in UI Thread. Look in my old example (that was prepared for other topic, but may be good for this topic too).
    2 linus:
    I think, you must a little bit reorganize you application for to do this. You must put your File Dialog into separated cycle. This cycle, of course, will be blocked when File Dialog appear on the screen. But other cy
    cle, which responsible for visualization will run continuosly at the same time...
    Attachments:
    no_block_with_file_open_dialog.zip ‏42 KB

  • Servlet in client/server application?

    hi,
    I am planing to make a client server application( SWING & an OODB), would it be clever to use servlet ( not httpservlet) as midle tier framework?
    If yes , what are the benefits?
    Thanks.

    thanks for responding
    actually my client don't wanna run a separate server application on the hosting machine as it costs too much, so thats why i think there is no other way to achieve the task rather than using servlets.
    please do help me or atleast give me a suggestion. actually i'm developing an internet messenger application. i have developed it using client/server application model in which both (the swing client and the server) uses java sockets to communicate with each other. but now i want to develop the server side of the messenger as servlets. but as far as i know the servlets follow the request/response model. if i follow that model i have to use some sort of client pull after certain amount of time say after five or ten seconds, and this approach does not fulfill my requirements as it would slow the performance if there are hundreds of clients calling the servlet every 5 seconds. thus i want to create persisted connections between the client and the servlet which last for the life time of the user's session. also it is important for the data integrity of the application, so please help me in this matter as i have no other source of guidence in this meany world. i hope you will certainely help me in this matter. please mention that if there are any drawbacks of my approach i mean the persisted connections.
    thanks you a lot
    Best reagrds
    Imran Sarwar.

  • Are there any Client/Server Application (using sockets) design patterns?

    Hi,
    The title of the post nearly says it all. I am searching for different design patterns related with the development of a client/server application. I understand that there must be any different ways on how a client/server application can be developed.
    Regards,
    Sim085
    Disclaimer:
    When I enter in the Socket forum on this site I recieve this message "Thank you for any participation in this forum. Due to a lack of relevant activity, we have decided to archive this forum on June 16, 2006. For future posts on this topic, we suggest you use the Networking forum" and I am not allowed to create a new post! However I can see posts done yesterday! All i did is add the forum in 'my forums'. Does this happen to you people as well?

    Hi Sim085...How are you?
    So look this:
    http://forum.java.sun.com/thread.jspa?threadID=5148926&tstart=75
    I don�t know if is what you want...but I hope in this^^
    Ok man...If you have one example for help you is better.
    [ ]

  • Complier error concerning Client Server Application. Error in the server

    Hi I am trying to implement a client server application that will carry out basic calculations. However I am recienving this compiler error within the server class.
    unreported exception java.io.IOException; must be caught or delcared to be thrown.
    The code is pasted below.
    Your help would be much appreciated.
    Kind Regards
    Ridha
    import java.io.*;
    import java.net.*;
    import java.util.Hashtable;
    public class Server
        public static void main(String []args)
            ServerSocket calcServer = null;
            try
                // Create a socket on server
                //ServerSocket ss = new ServerSocket(7);
                calcServer = new ServerSocket(7);
            catch (IOException e)
                System.out.println("Could not listen on port: 7.");
                System.exit(1);
            System.out.println("The Server is Running");
            // When clients connets, make the link and carry on
            Socket clientSocket = null;
            try
             clientSocket = calcServer.accept();
            catch (IOException e)
             System.err.println("Accept Failed");
             System.exit(1);
                // hashtable to manage list of online and offline users
                //Hashtable tOnlineUsers = new Hashtable(10);
                //Hashtable tOfflineUsers = new Hashtable(10);
                // Now start accepting connections from clients in a while loop
                // The server should run in an infinite loop
                 // to get data to and from server
    InputStream in = clientSocket.getInputStream(); < my error is here
                    BufferedReader br = new BufferedReader(new InputStreamReader(in));
                    OutputStream out = clientSocket.getOutputStream();
                    PrintWriter pr = new PrintWriter(out, true);
                while(true)
                    Worker w = new Worker(clientSocket);
                    w.start();
                }   // End of while
            }// End of main()
    }   // End of class

    well, using my superb powers of reasoning and deduction, I can say that this is a lemon entry, watson. the line you kindly highlighted can potentially throw an IOException which you are not dealing with. deal with it

  • Client-Server Application

    Hi everybody!
    I'd like to confirm if it's possible to replace the programs developed in Visual Basic.NET by Java? Including local file access, Databases, ODBC, GUI etc.
    In other words, to develop traditional MS Client-Server application to run standalone in a PC.
    Thanks

    Yes. - MOD

  • Client/server application using sockets

    Hi there,
    I'm trying to create a client/server application using sockets where the client has a GUI of a membership application form for some sort of club. Basically, the user will enter their name, address, membership no. etc in to various Jtext fields and then press a JButton to submit these details to the server. The server will then hopefully just dump these details to a text file.
    Can anyone give me any examples, ideas on how to start, links etc.
    Thanks v. much in anticipation,
    Nick

    Take a browse of the tutorial on sockets: http://java.sun.com/docs/books/tutorial/networking/sockets/clientServer.html

  • Client server application using CORBA

    Hi
    I have a basic client server application running using CORBA/idl where the client starts up and the server says hello back to the client. I have figured out the basics but would like some help with these small problems.
    When I start the client, the server says hello. Thats OK. Now I want the client to start a simple java app (called c:\test.java - it works) that I created before. How?
    The next bit is when I close down the app "test" that I start, I want the server to realise that its closing and simply say goodbye on the client. How?
    If anybody can help me, I'd appreciate it.
    Thanks for your time,
    Shaun

    hi,
    to my knowledge, you will have to define a method in idl file and in your client, which server invocates(saying good bye etc) before shutting down..
    ls.

  • Client/Server application question

    Hey everyone,
    I am trying to exercise on a client/server application. My client application is similar to this one [http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/Code/SocketClient.java]. However this client works like this: it sends text through socket -> receive response from server. I am trying to find a way so that the client can receive and process messages from the server asynchronously. That is the server can send messages anytime (not just as a response to the client) and the client should always be able to receive messages from the served at any time, and not just after it sent something. I believe that multithreading would be the answer, listening to the output stream and sending through the input stream should be run in parallel, but I can't find a way to implement it. Your help is appreciated. Thank you.

    I knew that :-) but how exactly?
    How do I translate this code into two runnable classes which will communicate with the original class and its gui?
    //Send data over socket
              String text = textField.getText();
              out.println(text);
           textField.setText(new String(""));
    //Receive text from server
           try{
           String line = in.readLine();
              System.out.println("Text received :" + line);
           } catch (IOException e){
          System.out.println("Read failed");
                 System.exit(1);
      }

  • How to validate a server in client-server application

    I am considering a client server application for a masters project. One of the core requirements for this application would be to ensure that the server could not be replaced. This would be easy to do using public/private keys. The client creates a message and encrypts using servers public key, then sends to the server. The server decrypts, processes, creates response, and encrypts using its private key. This works, however the public and private keys need to be in the source code. It looks like keystores may fix that problem, however the password to the key store would then be required. For this application to be usefull, I need to find a way to embed a password or encryption key in a .classfile in a way that it can not be retrieved by decompiling or parsing for strings. Anyone have ideas on how this could be done, or a different method I could use to guarantee that the response coming from a server process is from my server program and not a fake program?

    More detail. The program is a network license server (not web based). We need a simple license server for internal use, so that we can track usage and limit concurrent users for custom software. We also need some security so that people can not take the software home and use it. We have looked at commercial applications, however they are very expensive and we can not justify the cost since this is for internal software. There are 3 main pieces to a license server, the client libraries, the server, and the key generator. For the license server to be usefull, it should be impossible (or very very difficult) for someone to generate their own keys and add them to the license server. It should also be very difficult for them to create a fake license server that will grant licenses to clients without needing keys. If public/private key encryption is used, then the client would need to know the servers public key and their private key. These keys would need to be compiled into the program, stored in a key store, or looked up at run time from some other resource. The server would need to know its private key, and the clients public key. Since this is internal software, we can limit access to the server software, so it would be ok to compile the keys into the code (not ideal but secure enough for out use). However if I use this program as my Masters project, I would need to figure out a better way to secure it. The generic problem is how to give someone two programs that talk to each other, and be able to ensure that they do not fake one of the programs?

Maybe you are looking for