Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.

Add unpack_message method to v0x04#320

Merged
beraldoleal merged 1 commit into
kytos:masterfrom
renanrodrigo:add_unpack_method
Mar 21, 2017
Merged

Add unpack_message method to v0x04#320
beraldoleal merged 1 commit into
kytos:masterfrom
renanrodrigo:add_unpack_method

Conversation

@renanrodrigo

Copy link
Copy Markdown
Contributor

Fix #319

hdr_buff, msg_buff = buffer[:hdr_size], buffer[hdr_size:]
header = Header()
header.unpack(hdr_buff)
message = new_message_from_header(header)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new_message_from_header is going to broke, because is not defined here also, right ?

We have to be careful here, otherwise this is gone to use methods and attributes from v0x01.

@diraol @macartur comments, please.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the v0x04 file defines new_message_from_header. @macartur and I have discussed about the methods being very similar to each other and the possibility to make a common file to all versions in the future, but right now this was the only missing method in this file in particular.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right. sorry, my fault, I was reading another file.

@beraldoleal beraldoleal merged commit f81d25b into kytos:master Mar 21, 2017
@renanrodrigo renanrodrigo deleted the add_unpack_method branch April 5, 2017 16:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants