当前位置: 技术问答>linux和unix
unix 网络时间服务器的简单代码 有问题
来源: 互联网 发布时间:2015-09-04
本文导语: /*************************************************************************** main.c - description ------------------- begin : Sun...
/***************************************************************************
main.c - description
-------------------
begin : Sun Jan 23 19:36:48 EST 2005
copyright : (C) 2005 by aaaaaa
email : aaa@linux
***************************************************************************/
/***************************************************************************
* *
* 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
#include
#include
#include
#include
#include
#include
#define MAXLINE 20
#define SA struct sockaddr_in
#define DEBUG
#include
#include
int err_quit(char *s)
{
// perrno();
printf(s);
exit(1);
}
int Socket(int family, int type, int protocl)
{
int n;
if ( (n = socket(family, type, protocl))
main.c - description
-------------------
begin : Sun Jan 23 19:36:48 EST 2005
copyright : (C) 2005 by aaaaaa
email : aaa@linux
***************************************************************************/
/***************************************************************************
* *
* 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
#include
#include
#include
#include
#include
#include
#define MAXLINE 20
#define SA struct sockaddr_in
#define DEBUG
#include
#include
int err_quit(char *s)
{
// perrno();
printf(s);
exit(1);
}
int Socket(int family, int type, int protocl)
{
int n;
if ( (n = socket(family, type, protocl))