pipes.h

来自「D-ITG2.4源代码」· C头文件 代码 · 共 46 行

H
46
字号
 /*	Component of the D-ITG 2.4 Platform
 *
 * 	
 *	copyright	: (C) 2004  	by Stefano Avallone, Alessio Botta, Donato Emma, 
 *					Salvatore Guadagno, Antonio Pescape'
 *					DIS Dipartimento di Informatica e Sistemistica				 
 *					(Computer Science Department)
 *					University of Naples "Federico II"	
 *	email:		: {stavallo, pescape}@unina.it, {abotta, demma, sguadagno}@napoli.consorzio-cini.it
 *
 *	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.
 */
 
 

#define PIPE_BUFSIZE 1000
#define PIPE_TIMEOUT 100000
extern char nameProgram[];

struct pipeMsg {
	int flowId;
	int code;
};

#ifdef WIN32
extern HANDLE mutex_numPipes;
extern int numPipes;
#endif

#ifdef LINUX_OS
int createNewPipe(int fd[2]);
int sendPipeMsg(int fd[2], pipeMsg *msg);
int recvPipeMsg(int fd[2], pipeMsg *msg);
int closePipe(int fd[2]);
#endif
#ifdef WIN32
int createNewPipe(HANDLE pipe[3]);
int sendPipeMsg(HANDLE pipe[3], pipeMsg *msg);
int recvPipeMsg(HANDLE pipe[3], pipeMsg *msg);
int closePipe(HANDLE fd[3]);
#endif

⌨️ 快捷键说明

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