Skip to content

Commit 1c8f1d3

Browse files
committed
Document unix_socket as a parameter for callables in config
1 parent 44b5405 commit 1c8f1d3

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

docs/source/server-process.md

+15-8
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ For example, RStudio uses the term _frame origin_ and require the flag
152152
One of:
153153

154154
- A dictionary of strings that are passed in as HTTP headers to the proxy
155-
request. The strings `{port}` and `{base_url}` will be replaced as
156-
for **command**.
155+
request. The strings `{port}`, `{unix_socket}` and `{base_url}` will be
156+
replaced as for **command**.
157157
- A callable that takes any {ref}`callable arguments <server-process:callable-arguments>`,
158158
and returns a dictionary of strings that are used & treated same as above.
159159

@@ -181,9 +181,11 @@ server as raw stream data. This is similar to running a
181181
[websockify](https://github.com/novnc/websockify) wrapper.
182182
All other HTTP requests return 405.
183183

184-
#### Callable arguments
184+
### Callable arguments
185185

186-
Any time you specify a callable in the config, it can ask for any arguments it needs
186+
Certain config options accept callables, as documented above. This should return
187+
the same type of object that the option normally expects.
188+
When you use a callable this way, it can ask for any arguments it needs
187189
by simply declaring it - only arguments the callable asks for will be passed to it.
188190

189191
For example, with the following config:
@@ -213,13 +215,18 @@ The `port` argument will be passed to the callable. This is a simple form of dep
213215
injection that helps us add more parameters in the future without breaking backwards
214216
compatibility.
215217

216-
##### Available arguments
218+
#### Available arguments
217219

218-
Currently, the following arguments are available:
220+
Unless otherwise documented for specific options, the arguments available for
221+
callables are:
219222

220223
1. **port**
221-
The port the command should listen on
222-
2. **base_url**
224+
The TCP port on which the server should listen, or is listening.
225+
This is 0 if a Unix socket is used instead of TCP.
226+
2. **unix_socket**
227+
The path of a Unix socket on which the server should listen, or is listening.
228+
This is an empty string if a TCP socket is used.
229+
3. **base_url**
223230
The base URL of the notebook
224231

225232
If any of the returned strings, lists or dictionaries contain strings

0 commit comments

Comments
 (0)