求教!请教client & server program. 感激涕零# Unix - 噫吁兮,危乎高哉
b*r
1 楼
不知道为什么client在二次read的时候,返回值会是-1,它应该是0才对。
谢谢。
./server&
./client username
>>hello
/*server program
run as ./server &
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define MAXHOSTNAME 32
#define PORT 1550
#define SPACE " "
void *manage_client (void *argp);
/*
ABOUT ME
++++++++
I am a sample server, who handles messages from only one client.
I read com
谢谢。
./server&
./client username
>>hello
/*server program
run as ./server &
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define MAXHOSTNAME 32
#define PORT 1550
#define SPACE " "
void *manage_client (void *argp);
/*
ABOUT ME
++++++++
I am a sample server, who handles messages from only one client.
I read com