Skip to content

Conversation

@grosch
Copy link
Contributor

@grosch grosch commented Dec 6, 2019

It's more likely that somebody is going to have a Data object if they're sending raw bytes, so this just hides the underlying byte buffers to make life easier on us.

@florianreinhart
Copy link
Contributor

Why not use DataProtocol to be even more flexible?

@grosch
Copy link
Contributor Author

grosch commented Dec 6, 2019

You could do that too 😀

@weissi
Copy link
Collaborator

weissi commented Dec 6, 2019

@grosch if you add ...<Bytes: Collection(..., data: Bytes) where Bytes.Element == UInt8 then it’ll work for Data, DispatchData, Array and many more.

@weissi
Copy link
Collaborator

weissi commented Dec 6, 2019

(DataProtocol is a sub-protocol of (RandomAccess)Collection)

@kylebrowning
Copy link
Member

Ive incorporated this into #74

@grosch
Copy link
Contributor Author

grosch commented Dec 20, 2019

@weissi I'm not quite following. Can you show the exact method signature you're wanting?

@kylebrowning
Copy link
Member

@grosch Ive already added it. in #74

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.

4 participants