From 72a5bfb5bef0946f92d935990b17c0bb0c69f9ae Mon Sep 17 00:00:00 2001 From: goodale Date: Mon, 18 Sep 2000 11:34:52 +0000 Subject: All reading from socket is now done with HTTP_Read. HTTP_Read and HTTP_Write now both live in Sockets.c. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@40 1faa4e14-9dd3-4be0-9f0e-ffe519881164 --- src/Sockets.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'src/Sockets.c') diff --git a/src/Sockets.c b/src/Sockets.c index 122daa5..2c9b97e 100644 --- a/src/Sockets.c +++ b/src/Sockets.c @@ -227,6 +227,54 @@ int HTTP_Poll(cGH *cctkGH, long sec, long usec) return 0; } + /*@@ + @routine HTTP_Write + @date Fri Sep 15 18:47:41 2000 + @author Tom Goodale + @desc + Writes part or all of an HTTP reply. + @enddesc + @calls + @calledby + @history + + @endhistory + +@@*/ +int HTTP_Write(httpRequest *request, const char *buffer, size_t count) +{ + int retval; + + /* Currently don't do anything fancy. */ + retval = write(request->filedes, buffer, count); + + return retval; +} + + /*@@ + @routine HTTP_Read + @date Mon Sep 18 10:14:03 2000 + @author Tom Goodale + @desc + Reads part or all of an HTTP request. + @enddesc + @calls + @calledby + @history + + @endhistory + +@@*/ +int HTTP_Read(httpRequest *request, const char *buffer, size_t count) +{ + int retval; + + /* Currently don't do anything fancy. */ + retval = read(request->filedes, buffer, count); + + return retval; +} + /******************************************************************** ********************* Local Routines ************************* ********************************************************************/ -- cgit v1.2.3