You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**WARNING: This `valueMap` thing is complete nonsense and is definitely going to change in the next release.**
81
84
85
+
86
+
Listening for connections
87
+
-------------------------
88
+
89
+
When a FastCGI service is started, the stdin descriptor (fd 0) [is replaced by a bound socket](https://fast-cgi.github.io/spec#accepting-transport-connections). The service application can then start listening on that socket and accept connections.
90
+
91
+
This is done automatically when you call the `listen` method on the server object without arguments, or with a callback as the only argument.
92
+
93
+
The `isService` function is provided to check if the current script is being run as a FastCGI service.
94
+
95
+
```js
96
+
if (fcgi.isService()) {
97
+
fcgi.createServer(/* ... */).listen();
98
+
} else {
99
+
console.log("This script must be run as a FastCGI service");
100
+
}
101
+
```
102
+
103
+
82
104
Request URL components
83
105
----------------------
84
106
@@ -92,6 +114,7 @@ For more information read [section 4.1](https://tools.ietf.org/html/rfc3875#sect
92
114
93
115
Raw CGI variables can be accessed through the `params` property of the socket object. More information [here](#the-socket-object).
94
116
117
+
95
118
Authorizer and filter requests
96
119
------------------------------
97
120
@@ -103,6 +126,7 @@ Authorizer requests have no url. Response objects for the authorizer role expose
103
126
104
127
Filter requests have an additional data stream exposed by the `data` property of [the socket object](#the-socket-object) (`req.socket.data`).
105
128
129
+
106
130
The socket object
107
131
-----------------
108
132
@@ -115,6 +139,7 @@ The socket object exposes three additional properties:
115
139
-`dataStream` implements `stream.Readable`, exposes the FastCGI data stream for the filter role.
116
140
-`errorStream` implements `stream.Writable`, translates writes to stderr FastCGI Records.
117
141
142
+
118
143
http module compatibility
119
144
-------------------------
120
145
@@ -129,6 +154,7 @@ Differences:
129
154
-`req.trailers` will always be empty: CGI scripts never receive trailers
130
155
-`res.writeContinue()` works as expected but should not be used. See first item
0 commit comments