26 err(
"siod: not in server mode",x);
33 if ((fd=fopen(tmpfile,
"wb")) ==
NULL)
35 cerr <<
"siod: can't open temporary file \"" <<
36 tmpfile <<
"\" for client lisp return" << endl;
40 fwrite((
const char *)m,
sizeof(
char),m.
length(),fd);
49 cerr <<
"Could not send LP to socket" << endl;
69 cerr <<
"Could not acknowledge error to client." << endl;
73 static void acknowledge_sock_print(LISP x)
84 cerr <<
"Could not write acknowledge" << endl;
87 static void ignore_puts(
char *x)
98 if (!SetStdHandle(STD_INPUT_HANDLE,(HANDLE)fd))
101 cerr <<
"repl_from_socket: couldn't set stdin to socket\n";
124 "(send_client EXPR)\n\ 125 Send EXPR to client. In server mode this will send a printed form of\n\ 126 ESPR to the client. It is the client's job to expect it.");
Utility IO Function header file.
void init_subrs_srv(void)
LISP siod_send_lisp_to_client(LISP x)
EST_String make_tmp_filename()
Make a unique temporary filename.
int socket_send_file(SOCKET_FD fd, const EST_String &filename)
void err(const char *message, LISP x) EST_NORETURN
void(* repl_puts)(char *)
EST_String siod_sprint(LISP exp)
void init_subr_1(const char *name, LISP(*fcn)(LISP), const char *doc)
long repl_from_socket(int fd)
size_t length(void) const
Length of string ({not} length of underlying chunk)
long repl_driver(long want_sigint, long want_init, struct repl_hooks *)
void sock_acknowledge_error()