aboutsummaryrefslogtreecommitdiff
path: root/src/Sockets.c
diff options
context:
space:
mode:
authorgoodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2000-09-18 11:34:52 +0000
committergoodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2000-09-18 11:34:52 +0000
commit72a5bfb5bef0946f92d935990b17c0bb0c69f9ae (patch)
tree049314ccaa92fbdf40f1af1f01c3f7123ac705e8 /src/Sockets.c
parent7d29b42986d5c0af3846831923b52d36e310d8c1 (diff)
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
Diffstat (limited to 'src/Sockets.c')
-rw-r--r--src/Sockets.c48
1 files changed, 48 insertions, 0 deletions
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 *************************
********************************************************************/