example get fpc2

xpdf <[email protected]>
Newsgroups gmane.network.freenet.technical
Message-ID <[email protected]>
I would like to get the mykey from freenet. & printf it on screen.
What I have to make a request?
-> FcpMessageSend(serv, "ClientGet", 2, "Name", "test",
"ExpectedVersion", "2.0");
Please tell me.
_________________
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcp2.h>

int main(int argc, char *argv[])
{
    FcpMessage *msg;
    FcpServer *serv;
    int port=9481;
    char *host="127.0.0.1";
    char key[5000];
    char
mykey[]="CHK@~1D4uM8BqfGbHVjah91Izh-jIuZUn26S0T~uH-lHOW4,zvZCH2oY0IqsesCjH3E3rCUNObzbYEyYl4HWD0nqF-c,AAIA--8";

    msg = FcpMessageCreate(2*1024);
    if (msg==NULL)
        return(1);
    /* Connect to the server */
    serv = FcpServerConnect(host, port, 64*1024, 64*1024);
    if (serv==NULL)
    {
        printf("Couldn't connect to %s %d!!\n", host, port);
        return(1);
    }
    /* Send the client hello message */
    FcpMessageSend(serv, "ClientGet", 2, "Name", "test",
"ExpectedVersion", "2.0");
    /* Clean up */
    FcpServerDisconnect(serv);
    FcpMessageDestroy(msg);

    return(0);
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.