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

Added Broadcast ListIdentity support #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

csobsidian
Copy link

@csobsidian csobsidian commented Aug 2, 2017

Issue #12

  • Added new BroadcastListIdentity utility class
  • Added example usage to README.md

@csobsidian
Copy link
Author

csobsidian commented Aug 2, 2017

It probably could have been done in a simpler manner but I wanted to follow the netty style you used everywhere else. Technically this could also be used to get a ListIdentity from a unicast datagram also. There is no timeout. Specify a Consumer during instantiation. The consumer will be called for every ListIdentity received on that channel.

@csobsidian
Copy link
Author

It would also help if I referenced the correct issue. Original post edited to reference issue 12 not 11.

@kevinherron
Copy link
Contributor

Thanks, this looks good.

I need to implement the WriteTagFragmented service soon and then I'll do a new release.

EnipPacket.encode(packet, buf);

channel.writeAndFlush(new DatagramPacket(buf, address));
buf.release();
Copy link
Author

Choose a reason for hiding this comment

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

Hmm. I intermittently get a refCount error here. Are there some conditions where new DatagramPacket() will or will not release() the buffer on its own?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's released when you write it to the channel. If you retained it at some point you'd have to also release it.

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.

None yet

2 participants