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

📄 dateserver.c

📁 the source code from the book "UNIX Network Programming" by W. Richard Stevens. i hope it is useful
💻 C
字号:
/* * dateserver.c - remote procedures; called by server stub. */#include	"Date1_defs.h"	/* this file is generated by xnscourier *//* * Return the binary date and time. */BinDateResultsBinDate(conn, bdtptr)CourierConnection	*conn;		/* ignored */char			*bdtptr;	/* ignored */{	BinDateResults	result;	long		time();			/* Unix function */	result.bindate = time((long *) 0);	return(result);}/* * Convert a binary time and return a human readable string. */StrDateResultsStrDate(conn, bdtptr, bintime)CourierConnection	*conn;		/* ignored */char			*bdtptr;	/* ignored */long			bintime;{	StrDateResults	result;	char		*ctime();		/* Unix function */	result.strdate = ctime(&bintime);	/* convert to local time */	return(result);}

⌨️ 快捷键说明

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