summaryrefslogtreecommitdiff
path: root/src/c/urweb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/urweb.c')
-rw-r--r--src/c/urweb.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 8ecef7c5..4cd347b2 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -479,6 +479,8 @@ struct uw_context {
// For caching.
char *recording;
+
+ int remoteSock;
};
size_t uw_headers_max = SIZE_MAX;
@@ -564,6 +566,8 @@ uw_context uw_init(int id, uw_loggers *lg) {
ctx->recording = 0;
+ ctx->remoteSock = -1;
+
return ctx;
}
@@ -651,6 +655,7 @@ void uw_reset_keep_error_message(uw_context ctx) {
ctx->amInitializing = 0;
ctx->usedSig = 0;
ctx->needsResig = 0;
+ ctx->remoteSock = -1;
}
void uw_reset_keep_request(uw_context ctx) {
@@ -4471,3 +4476,11 @@ uw_Basis_string uw_Basis_blessData(uw_context ctx, uw_Basis_string s) {
return s;
}
+
+int uw_remoteSock(uw_context ctx) {
+ return ctx->remoteSock;
+}
+
+void uw_set_remoteSock(uw_context ctx, int sock) {
+ ctx->remoteSock = sock;
+}