Skip to content

Commit

Permalink
Update Server.hx (#34)
Browse files Browse the repository at this point in the history
close #31
  • Loading branch information
nulld authored Feb 6, 2023
1 parent 93a8027 commit d5862fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hxcpp-debug-server/hxcpp/debug/jsonrpc/Server.hx
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,9 @@ class Server {

socketMutex.acquire();
var serialized:String = haxe.Json.stringify(m);
socket.output.writeInt32(serialized.length);
socket.output.writeString(serialized);
var bytes = haxe.io.Bytes.ofString(serialized);
socket.output.writeInt32(bytes.length);
socket.output.writeBytes(bytes, 0, bytes.length);
// trace('sendResponse: ${m.id} ${m.method}');
socketMutex.release();
}
Expand Down

0 comments on commit d5862fe

Please sign in to comment.