gmdefault.cpp

来自「GNU-Monitor是一个开源事务监视系统。它允许创建一个3层的客户端/服务器」· C++ 代码 · 共 54 行

CPP
54
字号
/***************************************************************************                           gmecho.cpp  -  description                             -------------------    begin                : Miercoles 30 de octubre de 2002    copyright            : (C) 2002 by Walter Gabriel Pirri    email                : gnumonitor@witch-blade.com.ar ***************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * ***************************************************************************/#include <unistd.h>#include <stdio.h>#include <stdlib.h>#include <signal.h>#include <string.h>#include <sys/wait.h>#include <syslog.h>#include <fcntl.h>#include <errno.h>#include <gnumonitor/gmerror.h>/*	Las Funciones de abajo deben estar declaradas en el programa cliente cuando	el servidor sea standalone*/int gm_server_init(void){	syslog(LOG_INFO, "server_init()");	return 0;}void gm_server_exit(void){	syslog(LOG_INFO, "server_exit()");}/*	El buffer alocado lo libera la librer铆a una vez enviao el mensaje	-- Esto es para discutirlo puede sue sea mejor eliminarlo en la func铆o server_exit()*/int gm_server_main(const char *funcion, void* in, unsigned long inlen, void** out, unsigned long *outlen){	syslog(LOG_INFO, "server_main(%s, 0x%08X, %lu)", funcion, in, inlen);	/* los pipes del server de cuando se levant

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?