clean up some code to be ready for new examples;
parent
a0633fc451
commit
11498689e3
@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* Secure X Message Passing Library v2 examples.
|
||||||
|
*
|
||||||
|
* (c) Alexander Vdolainen 2013-2015 <avdolainen@gmail.com>
|
||||||
|
*
|
||||||
|
* libsxmp is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU Lesser General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* libsxmp is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.";
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is an example of sxmp usage.
|
||||||
|
* NOTE: It was developed quite fast within one day,
|
||||||
|
* btw - this the reason of some ugly code here.
|
||||||
|
*
|
||||||
|
* This is a master or simply - daemon part, it will
|
||||||
|
* listen a requests and create a stream with directory entries,
|
||||||
|
* which ridden by the client.
|
||||||
|
* This implements a simple client-server topology, to see
|
||||||
|
* more advanced technics check out other examples.
|
||||||
|
*
|
||||||
|
* NOTE(win32): don't have a time to test it or fix it to
|
||||||
|
* make it works on windows, if you can - u're welcome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __SXMP_EXAMPLES_FILELIST_H__
|
||||||
|
#define __SXMP_EXAMPLES_FILELIST_H__
|
||||||
|
|
||||||
|
#define DEFAULT_PORT 10240
|
||||||
|
|
||||||
|
#define DEBUG
|
||||||
|
#define FREE(x) { if (x) { free(x); x = NULL; } }
|
||||||
|
#define MAX_STREAMS INT_MAX
|
||||||
|
|
||||||
|
#endif /*__SXMP_EXAMPLES_FILELIST_H__*/
|
@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* Secure X Message Passing Library v2 examples.
|
||||||
|
*
|
||||||
|
* (c) Alexander Vdolainen 2013-2015 <avdolainen@gmail.com>
|
||||||
|
*
|
||||||
|
* libsxmp is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU Lesser General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* libsxmp is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.";
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is an example of sxmp usage.
|
||||||
|
* NOTE: It was developed quite fast within one day,
|
||||||
|
* btw - this the reason of some ugly code here.
|
||||||
|
*
|
||||||
|
* This is a master or simply - daemon part, it will
|
||||||
|
* listen a requests and create a stream with directory entries,
|
||||||
|
* which ridden by the client.
|
||||||
|
* This implements a simple client-server topology, to see
|
||||||
|
* more advanced technics check out other examples.
|
||||||
|
*
|
||||||
|
* NOTE(win32): don't have a time to test it or fix it to
|
||||||
|
* make it works on windows, if you can - u're welcome.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#define __USE_GNU
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#include <sys/select.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/resource.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <uuid/uuid.h>
|
||||||
|
#include <execinfo.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
|
#include <tdata/usrtc.h>
|
||||||
|
#include <sexpr/sexp.h>
|
||||||
|
#include <sxmp/limits.h>
|
||||||
|
#include <sxmp/sxmp.h>
|
||||||
|
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <getopt.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include "filelist.h"
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int opt;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue