Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
This page will go through the protocol data units and their trasnmission.
The basic PDU is an RPC Message
which can either be a Request or
Each message is formatted as a
Hash data structure and transmitted in serialized form -- the serialization type is up to the implementation.
Request messages contain the following key-value pairs:
message-- RPC message in the form of
args-- Array of arguments for the remote method or empty array if the method expects no arguments.
token-- Optional authentication token to be verified by the server implementation.
Response messages contain the following key-value pairs:
obj-- The return value of the Request.
exception-- Used to denote a server-side error and is a
type-- Exception type, basically a Ruby class name as a string.
message-- Assotiated message.
The flow is very simple:
- Client -- Initiates connection to server.
- Server -- Accepts connection.
- Client -- Sends RPC request.
- Server -- Recieves RPC request, sends RPC response.
- Client -- Receives RPC response.
The Server will keep the connection alive so that it can be re-used, however the Client is free to close it if it so chooses.
For a reference implementation of a client, please see the Arachni-RPC Pure repository.