diff src/c/urweb.c @ 2220:794017f378de

Merge.
author Ziv Scully <ziv@mit.edu>
date Mon, 24 Nov 2014 20:47:38 -0500
parents 98b87d905601 1839df6ed755
children 5709482a2afd
line wrap: on
line diff
--- a/src/c/urweb.c	Mon Nov 24 20:41:24 2014 -0500
+++ b/src/c/urweb.c	Mon Nov 24 20:47:38 2014 -0500
@@ -479,6 +479,8 @@
 
   // For caching.
   char *recording;
+
+  int remoteSock;
 };
 
 size_t uw_headers_max = SIZE_MAX;
@@ -564,6 +566,8 @@
 
   ctx->recording = 0;
 
+  ctx->remoteSock = -1;
+
   return ctx;
 }
 
@@ -651,6 +655,7 @@
   ctx->amInitializing = 0;
   ctx->usedSig = 0;
   ctx->needsResig = 0;
+  ctx->remoteSock = -1;
 }
 
 void uw_reset_keep_request(uw_context ctx) {
@@ -4471,3 +4476,11 @@
 
   return s;
 }
+
+int uw_remoteSock(uw_context ctx) {
+  return ctx->remoteSock;
+}
+
+void uw_set_remoteSock(uw_context ctx, int sock) {
+  ctx->remoteSock = sock;
+}