change permalinks

This commit is contained in:
Lukasz Skotarek 2020-04-02 10:54:30 +02:00
parent 63f9168258
commit a8f4b86046
23 changed files with 46 additions and 46 deletions

View file

@ -5,7 +5,7 @@ author: dreat
post_excerpt: ""
layout: post
permalink: >
http://dreat.info/2017/04/02/opensettlersii-2/
http://dreat.info/2017-04-02-opensettlersii-2/
published: true
post_date: 2017-04-02 21:05:54
---
@ -23,4 +23,4 @@ I added 2 tests to correctly decode long frames, for both command and message. W
Now onward to code itself. There's only one public decode function, but it calls one of the private ones depending of the flag. There's a pattern matching on <em>long </em>key, and binary data. As you can see here I used <em>::size </em>accordingly.
What's worth noting is if you want to match against <em>unknown sized</em> binary data you can use ::binary. Here I used it for body and for "rest" in main function - as before getting flags I don't care about size and body.
And that's it! Not a lot, but I learnt a bit when it comes to working with binary data in Elixir and made code a bit "better".
And that's it! Not a lot, but I learnt a bit when it comes to working with binary data in Elixir and made code a bit "better".