Source of cmd_sockets.h


/* cmd_sockets.h -- interface to command sockets for gemsvnc */

#ifndef __cmd_sockets__h__
#define __cmd_sockets__h__

/* 
   The command sockets support is presently limited to stdin/stdout, but in the future, it will also support Berkeley tcp sockets
   connecting to a well known port.  The interface is simple.  The model is enquiry-response.  The gemsvnc server attemps to read
   a command line from the next available connection by calling:
*/
extern char* enquiry(void);
/*
   This either returns a pointer to a command line that was read, or NULL if no such line was available.  The gemsvnc server then
   processes the command and generates an optional response, which is returned to the same socket by:
*/
extern void response(char*);
/*
   Multiple calls to response() are permitted so long as no intervening calls to enquiry() are performed.  When equiry() is
   called, it maintains state to keep track of which connection the enquiry came from, and response will reply to that same
   socket.  When enquiry() is call again, the current connection is updated to reflect where that latest command came from, which
   may very well be different from the provious call to enquiry().  For this reason, all responses to an enquiry must be completed
   before starting a new enquiry.
*/

#endif /* __cmd_sockets__h__ */