⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simpserv.c

📁 TUXEDO例子
💻 C
字号:
/*	(c) 2003 BEA Systems, Inc. All Rights Reserved. *//*	Copyright (c) 1997 BEA Systems, Inc.  	All rights reserved  	THIS IS UNPUBLISHED PROPRIETARY  	SOURCE CODE OF BEA Systems, Inc.  	The copyright notice above does not  	evidence any actual or intended  	publication of such source code.*//* #ident	"@(#) samples/atmi/simpapp/simpserv.c	$Revision: 1.5 $" */#include <stdio.h>#include <ctype.h>#include <atmi.h>	/* TUXEDO Header File */#include <userlog.h>	/* TUXEDO Header File *//* tpsvrinit is executed when a server is booted, before it begins   processing requests.  It is not necessary to have this function.   Also available is tpsvrdone (not used in this example), which is   called at server shutdown time.*/#if defined(__STDC__) || defined(__cplusplus)tpsvrinit(int argc, char *argv[])#elsetpsvrinit(argc, argv)int argc;char **argv;#endif{	/* Some compilers warn if argc and argv aren't used. */	argc = argc;	argv = argv;	/* userlog writes to the central TUXEDO message log */	userlog("Welcome to the simple server");	return(0);}/* This function performs the actual service requested by the client.   Its argument is a structure containing among other things a pointer   to the data buffer, and the length of the data buffer.*/#ifdef __cplusplusextern "C"#endifvoid#if defined(__STDC__) || defined(__cplusplus)TOUPPER(TPSVCINFO *rqst)#elseTOUPPER(rqst)TPSVCINFO *rqst;#endif{	int i;	for(i = 0; i < rqst->len-1; i++)		rqst->data[i] = toupper(rqst->data[i]);	/* Return the transformed buffer to the requestor. */	tpreturn(TPSUCCESS, 0, rqst->data, 0L, 0);}

⌨️ 快捷键说明

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