Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
value of bytes read in the call, not the absolute position
Also clearify that 'read' is undefined if the function fails.
|
|
This is a rather complicated way to fix backlogging issues. It asks the client to pass partial buffer, and the client also must retry with NULL buffer if ac_receive returns AC_E_AGAIN.
|
|
|
|
ServerLoginNetworkHandler#addToServer
Carpet mod fake players will call the former method directly.
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
API:ADD
|
|
|
|
API:CHANGE
|
|
|
|
|
|
API:CHANGE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Meson is better on resolving dependencies on various platforms.
|
|
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
1. Make SIGINT interrupt the current operation by forcing stdin to listen again (because the spec currently does not specify how to send the final response, so acronc will wait forever in case of invalid commands)
2. Prettify prompt and output.
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Cause:
1. stdin got cmd -> request
2. stdin got EOF -> ac_disconnect -> ac_conn becomes NULL
3. socket got response -> ac_receive(ac_conn) -> crash
Conclusion: ordering issue between ac_disconnect and socket read.
Solution:
Best way: pause the input until command returns
Cons:
1. Lost the advantage of background execution of commands (has to wait until done)
2. It is unreliable to determine if a command is done: although the current server implementation will not send anything else after an error or cmd_result, Minecraft server itself or future server implementations may. The spec does not say anything on termination.
Acronc currently assumes that after receiving an error or cmd_result with the same request ID, it is done. Then, it resumes the stdin, reads the EOF, and then disconnect.
Worse way: Directly call uv_read_stop before ac_disconnect
Cons: It is going to lose anything, including command results. This is particularly undesirable for ad-hoc calls (i.e. echo list | acronc).
Therefore, the current approach is to block and read as much as we can (until error or cmd_result), then stop reading the socket before disconnecting as a double safe.
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
The corresponding CMakeLists.txt files are still rough.
|
|
Still in early development, Windows support is incomplete.
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
API:CHANGE
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
This surpasses the warning of `Unable to locate method mapping for @At(INVOKE.<target>) 'Lorg/apache/logging/log4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V'`.
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
API:CHANGE
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Otherwise ASAN does not seem to run (if terminated).
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
API:ADD
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
WinSock does not use errno.
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
The former approach, strerror(3), is not working on Win32 errors (GetLastError()) or WinSock errors (WSAGetLastError()).
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|
|
API:CHANGE
Signed-off-by: Trumeet <yuuta@yuuta.moe>
|