4 Advanced Topics - Reference Documentation
Authors: Yasuharu NAKANO
Version: 0.3
Table of Contents
4 Advanced Topics
4.1 Communication Protocol
4.1.1 Standard Protocol
Theimprox-start
command opens and listens a TCP port as a server.Request from Client to Server
A client sends a command line with a line separator as request.COMMAND
help
test-app unit: sample.SampleUnitTests
Response from Server to Client
While a server is sending a response, a client can read the response from a keep-aliving socket. When the server finishes sending all response to the client, the socket will be closed by the server. The client knows that the session is done by closing the socket.4.1.2 HTTP Protocol
The improx sever also supportsGET
method of HTTP
protocol.GET /COMMAND HTTP/1.0
GET /COMMAND HTTP/1.1
COMMAND
- a command line which is encoded by URL encoding.
GET /help HTTP/1.1
GET /test-app%20unit:%20sample.SampleUnitTests HTTP/1.1
curl
, wget
, Chrome
, Firefox
and even Internet Explorer
.curl http://localhost:8096/help curl http://localhost:8096/test-app%20unit:%20sample.SampleUnitTest
You might need a --noproxy '*'
option if you've set environment variables for http proxy.
Web browser often requests for favicon:GET /favicon.ico HTTP/1.1
favicon.
",
improx server returns a "Command not found" error message instead of causing an actual error.
4.2 Unsupported Commands
As same as interactive mode
- install-plugin
- uninstall-plugin
Special built-in commands
- create-app
- quit
- stop-app
- exit and
- !(shell command)
Using threads complexly
Because a start-app command causes a new thread to monitor the user input on interactive mode. The issue seems to be caused by handling the old thread.- start-app