35 #ifndef __EST_SERVER_H__ 36 #define __EST_SERVER_H__ 127 void init(ostream *trace);
191 int port(
void)
const;
212 const Args &arguments);
222 const Args &arguments,
float end(const EST_Item &item)
Answer one client at a time.
EST_Server(EST_String name, EST_String type)
Create a server connection by name, defaulting to "fringe", the default server name.
For off a process for each client.
void return_value(BufferedSocket &socket, Result &res, bool last)
const EST_String type(void) const
Type of server.
void run(RequestHandler &handler)
void handle_client(BufferedSocket &socket, RequestHandler &handler)
const EST_String address(void) const
Dotted numeric IP address.
bool execute(const EST_String package, const EST_String operation, const Args &arguments, ResultHandler &handler)
virtual EST_String build_result(const Result &res)
void run_sequential(RequestHandler &handler)
int port(void) const
Port number.
virtual EST_String process(void)=0
const EST_String name(void) const
Name of server.
void err(const char *message, LISP x) EST_NORETURN
const EST_String servername(void) const
Domain name or IP number.
virtual EST_String build_command(const EST_String package, const EST_String operation, const Args &arguments)
Mode
What type of server is this.
Answer requests from several clients, as requests arrive.
virtual ~RequestHandler()
EST_connect_status connect(void)
Connect to the server.
virtual bool parse_command(const EST_String command, EST_String &package, EST_String &operation, Args &arguments)
virtual ~EST_Server()
Destroy the connection.
bool check_cookie(BufferedSocket &socket)
void write(BufferedSocket &s, const EST_String string, const EST_String term="")
bool connected(void)
Are we connected at the moment?
Multi-threaded (not implemented)
EST_String read_data(BufferedSocket &s, const EST_String end, int &eof)
Client end of the connection.
EST_connect_status disconnect(void)
Disconnect.
virtual bool parse_result(const EST_String resultString, Result &res)
void return_error(BufferedSocket &socket, EST_String err)
const EST_String hostname(void) const
Domain name of the server.
bool process_command(BufferedSocket &socket, EST_String command, RequestHandler &handler)