Skip to content

Protocol class minor problems#204

Merged
jakinyele merged 2 commits intoJHUISI:devfrom
EDVTAZ:protocol_fix
Mar 3, 2019
Merged

Protocol class minor problems#204
jakinyele merged 2 commits intoJHUISI:devfrom
EDVTAZ:protocol_fix

Conversation

@EDVTAZ
Copy link
Copy Markdown
Contributor

@EDVTAZ EDVTAZ commented Mar 1, 2019

Hi all,

I'm trying to create a protocol with charm, and ran into some problems.
The recv_msg function in the Protocol class wasn't working, because unpickleObject didn't allow bytes objects. The other problem was that my messages were getting truncated at 2048, because of MAX_SIZE, and there was no way to tweak this variable from the child class since it was not part of the Protocol class.

EDVTAZ added 2 commits March 1, 2019 08:31
This way it is possible to set the MAX_SIZE maximum message size from
classes derived from Protocol class, if necessary.

Signed-off-by: Gabor Szekely <szvgabor@gmail.com>
b64decode can take both str and bytes objects as well, and the
deserialize function in the Protocol class calls this function with a
bytes object

Signed-off-by: Gabor Szekely <szvgabor@gmail.com>
@EDVTAZ EDVTAZ changed the title Protocol fix Protocol class minor problems Mar 1, 2019
@jakinyele jakinyele merged commit 3081dbc into JHUISI:dev Mar 3, 2019
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.

2 participants