|
|
Two types of input can be sent to a remote application:
Data is sent using the rx_write routine. The usage is intended to be similar to the write system call.
int written; /* number of characters written by rx_write() */Signals are sent using the rx_signal routine. The usage is intended to be similar to the kill system call.written = rx_write(cnum, buf, len);
int cnum; /* connection number */static void sig_hand(signo) int signo; /* signal number */ { /* assuming only the allowed 4 signals invoke this routine */ (void) rx_signal(cnum, signo); }
main() { . . . /* set up signal handler routine */ (void) signal(SIGHUP, sig_hand); (void) signal(SIGINT, sig_hand); (void) signal(SIGPIPE, sig_hand); (void) signal(SIGQUIT, sig_hand); . . . }