blob: ba52bf26f9ea49494abd49b4a5fe5f8e1e5ca3c6 (
plain) (
tree)
|
|
/* $Id: chc_net.c,v 1.3 2002/07/05 17:10:27 in2 Exp $ */
#include "bbs.h"
typedef struct drc_t {
rc_t from, to;
} drc_t;
int
chc_recvmove(int s)
{
drc_t buf;
if (read(s, &buf, sizeof(buf)) != sizeof(buf))
return 1;
chc_from = buf.from, chc_to = buf.to;
return 0;
}
void
chc_sendmove(int s)
{
drc_t buf;
buf.from = chc_from, buf.to = chc_to;
write(s, &buf, sizeof(buf));
}
|