NunoACHenriques <[EMAIL PROTECTED]> writes:

>       Hi!
>       Where can I find documentation about the Script-fu-server protocol?

You have to read the source code.

>       Sorry if this is an off-topic post but I couldn't find the Protocol
> anywhere and my problem is:
>       I run the gimp-script-fu-server (Gimp 1.2.1 for Linux) and I have a C
> program that opens a TCP socket to it (port 10008). I get connected but when
> I send a simple command like "(set! x)" the server shutdown the socket?!...
> :-( What am I doing wrong?

Here's a Java program I wrote that talks to the server:
It reads lines from stdin and sends them to the server.


public class GimpClient {
    public static void main(String args[]) throws IOException {
        Socket sock;
        DataInputStream dis;
        PrintStream dat;
        byte[] header = new byte[2];
        byte[] reply = new byte[99];
        InputStreamReader is = new InputStreamReader(;
        BufferedReader br = new BufferedReader(is);

        sock = new Socket("localhost",10008);

        dis = new DataInputStream(sock.getInputStream());
        dat = new PrintStream( sock.getOutputStream());
            String myline = br.readLine();
            if (myline == null) break;
            header[0] = (byte) (myline.length()>>8);
            header[1] = (byte) (myline.length() % 256);
            dat.print("G"+new String(header)+myline);
            int len =;
            for (int i = 0; i < len; i++){

Gimp-developer mailing list

Reply via email to