Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scaffold for server to send and receive messages #6

Merged
merged 12 commits into from
Feb 6, 2024
Merged

Conversation

Jakobeha
Copy link
Contributor

@Jakobeha Jakobeha commented Feb 5, 2024

Some details:

  • The server only allows one client to connect per address, but can bind to multiple addresses.
  • The server spawns a thread and ClientHandler for every client/address.
  • The ZeroMQ socket type is "request/reply". There's a separate method to handle each possible initial request, but if that request starts a reply/request chain, the method can handle that using callbacks.

This PR is rebased on script-tests and has other small fixes

GNU-R bytecode contains both instructions and metadata, ours only contains instructions, so the indices of our instructions are different. Since labels are offsets in the bytecode, this means they need to be different as well.

Of course, if the labels are only used by GNU-R and we don't modify and re-encode the bytecode this is unnecessary. But, I'm sure we'll use the labels and their offsets while compiling, even if just to find the position to generate native code
@Jakobeha Jakobeha merged commit a77ce1d into main Feb 6, 2024
2 checks passed
@Jakobeha Jakobeha deleted the server-init branch February 6, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant