bashserver icon indicating copy to clipboard operation
bashserver copied to clipboard

can headle sevaral requests meantime?

Open freemember007 opened this issue 6 years ago • 4 comments

look like it can only headle one request once.

freemember007 avatar Mar 17 '18 10:03 freemember007

Simultaneous connections are not possible with netcat. It can only serve one user at a time. Just curious. What did you intend to use it for?

noxtras avatar Mar 17 '18 11:03 noxtras

@noxtras thank you reply so quickly! I want to let my web user can execute bash script through remote HTTP request to do some hard word such as batch curl and zip imgs and then download them. and I don't want to write a nodejs server or others . Bash is simple and powerful and cool:)

freemember007 avatar Mar 17 '18 11:03 freemember007

@noxtras realy impossible? maybe run muiti background poccess can do it?

freemember007 avatar Mar 17 '18 11:03 freemember007

from what I read about netcat, it's not a viable option. (I think) If you run multiple background processes, they will be opened on different ports.. You could see if any of the replies here are good for you (i've not tested them): https://unix.stackexchange.com/questions/32182/simple-command-line-http-server

noxtras avatar Mar 17 '18 12:03 noxtras