32 lines
1.2 KiB
C
32 lines
1.2 KiB
C
/* ************************************************************************** */
|
|
/* _____ _ */
|
|
/* client.c |_ _|__ _ _| |__ ___ _ _ */
|
|
/* | Project: p7test | |/ _ \| | | | '_ \ / _ \ | | | */
|
|
/* | | (_) | |_| | | | | __/ |_| | */
|
|
/* By: thomas <thomas@touhey.fr> |_|\___/ \__,_|_| |_|\___|\__, |.fr */
|
|
/* Last updated: 2017/01/13 01:40:23 |___/ */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
#include "main.h"
|
|
#include <libp7.h>
|
|
#include <libp7/packetio.h>
|
|
#include <libp7/stream.h>
|
|
|
|
void run_client(int in, int out)
|
|
{
|
|
/* make the handle */
|
|
p7_handle_t *handle = NULL; int err;
|
|
if ((err = p7_fdinit(&handle, P7_ACTIVE | P7_CHECK | P7_TERM, "client",
|
|
in, out))) {
|
|
fprintf(stderr, "Client initialization encountered an error: %s\n",
|
|
p7_strerror(err));
|
|
return ;
|
|
}
|
|
|
|
/* change working directory. */
|
|
p7_send_cmdfls_cwd(handle, "oui", "fls0");
|
|
|
|
/* we're done. */
|
|
p7_exit(handle);
|
|
}
|