Commit abbc288d authored by Vít Kabele's avatar Vít Kabele

Updated protocol and fixed compatibility with protobuf

parent a7cc0a2a
......@@ -5,6 +5,17 @@ src-disl-agent/windows-*
# Compiled shared libraries
*.so
*.jnilib
# Compiled object files
*.o
# Compiled examples
examples/**/*.class
examples/**/*.jar
# Logs
*.log
# Anything in the output
output/*
......
......@@ -219,10 +219,8 @@ __instrument_class (
// connection again.
//
InstrumentClassRequest request = INSTRUMENT_CLASS_REQUEST__INIT;
request.has_flags = true;
request.flags = request_flags;
request.classname = (char *) class_name;
request.has_classbytes = true;
request.classbytes.len = class_def->class_byte_count;
request.classbytes.data = (uint8_t *) class_def->class_bytes;
......@@ -266,7 +264,6 @@ __instrument_class (
class_def->class_byte_count = response->classbytes.len;
class_def->class_bytes = response->classbytes.data;
response->has_classbytes = false;
response->classbytes.len = 0;
response->classbytes.data = NULL;
......
This diff is collapsed.
This diff is collapsed.
......@@ -4,10 +4,47 @@ option java_package = "ch.usi.dag.dislserver";
option java_outer_classname = "Protocol";
option optimize_for = LITE_RUNTIME;
// Common type to send errors
message Error {
int32 code = 1;
string message = 2;
}
// Request server to initialize session
// This is sent as the clients first message
// May contain some additional data to describe the client (JVM version etc.)
message SessionInitRequest {
int32 code = 1;
}
// This is the response to SessionInitRequest message
// The request could either be ACCEPTed or DENYed
// In the case of positive answer, there is also a session_id present
message SessionInitResponse {
bool accepted = 1;
int32 session_id = 2;
repeated Error errors = 3;
}
// When the client obtains the session_id, next step should be sending
// the instrumentation jar (or more of them) to the instrumentation server.
message InstrumentationDelivery {
int32 session_id = 1;
repeated bytes instrumentation = 2;
}
// This is server response to InstrumentationDelivery message
message InstrumentationAcceptConfirmation{
bool instrumentation_accepted = 1;
repeated Error errors = 2;
}
// This is the response to the instrumentaion server to instrument attached class.
message InstrumentClassRequest {
int32 flags = 1;
string className = 2;
bytes classBytes = 3;
int32 session_id = 1;
int32 flags = 2;
string className = 3;
bytes classBytes = 4;
}
enum InstrumentClassResult {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment