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

Extract method Input#read_from_io #315

Merged
merged 1 commit into from
Jan 15, 2024
Merged

Conversation

iberianpig
Copy link
Owner

@iberianpig iberianpig commented Jan 15, 2024

  • To change the way to extract data after IO.select, override Input#read_from_io method
  • When using binary encoded packed data containing "\n" in the data with input plugin using msgpack, an error occurred
  • With the previous implementation, the input plugin depended on io.readline(chomp: true) when extracting data after IO.select, so the input plugin needed to send a string containing a newline
  • By extracting method Input#read_from_io method, each plugin can define its own encoding or delimiter by override

- To change the way to extract data after IO.select, override Input#read_from_io method
- When using binary encoded packed data containing "\n" in the data with input plugin using msgpack, an error occurred
- With the previous implementation, the input plugin depended on `io.readline(chomp: true)` when extracting data after IO.select, so the input plugin needed to send a string containing a newline
- By cutting out read_from_io method, each plugin can extend the way data is extracted
@iberianpig iberianpig merged commit e93672d into main Jan 15, 2024
4 checks passed
@iberianpig iberianpig deleted the feature/input_read_from_io branch January 15, 2024 14:37
@iberianpig iberianpig added the bug label Jan 15, 2024
@iberianpig iberianpig self-assigned this Jan 15, 2024
@iberianpig iberianpig changed the title fix: cutting out read_from_io from Input class Extract method Input#read_from_io Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant