File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -134,18 +134,20 @@ let setup_upload server : unit =
134
134
let () =
135
135
let port_ = ref 8080 in
136
136
let j = ref 32 in
137
+ let addr = ref " 127.0.0.1" in
137
138
Arg. parse
138
139
(Arg. align
139
140
[
140
141
" --port" , Arg. Set_int port_, " set port" ;
141
142
" -p" , Arg. Set_int port_, " set port" ;
142
143
" --debug" , Arg. Unit setup_logging, " enable debug" ;
143
144
" -j" , Arg. Set_int j, " maximum number of connections" ;
145
+ " --addr" , Arg. Set_string addr, " binding address" ;
144
146
])
145
147
(fun _ -> raise (Arg. Bad " " ))
146
148
" echo [option]*" ;
147
149
148
- let server = Tiny_httpd. create ~port: ! port_ ~max_connections: ! j () in
150
+ let server = Tiny_httpd. create ~addr: ! addr ~ port:! port_ ~max_connections: ! j () in
149
151
150
152
Tiny_httpd_camlzip. setup ~compress_above: 1024 ~buf_size: (16 * 1024 ) server;
151
153
let m_stats, get_stats = middleware_stat () in
You can’t perform that action at this time.
0 commit comments