Archives

By Year

2008

2009

2010

2011

2012

2013

2014

2015

2016

2017

2018

2019

2020

2021

2022

2023

By Month

2008/1

2008/10

2008/11

2008/2

2008/4

2008/5

2008/6

2008/7

2008/8

2008/9

2009/1

2009/10

2009/12

2009/2

2009/4

2009/5

2009/6

2009/8

2009/9

2010/10

2010/11

2010/12

2010/3

2010/4

2010/5

2010/6

2010/8

2011/1

2011/11

2011/2

2011/3

2011/6

2011/7

2012/1

2012/10

2012/12

2012/3

2012/6

2012/9

2013/10

2013/4

2013/5

2013/8

2014/3

2014/4

2014/5

2014/6

2014/7

2014/8

2015/5

2015/6

2016/3

2016/4

2016/7

2017/10

2017/11

2017/12

2017/2

2017/3

2017/4

2017/6

2017/8

2018/5

2019/12

2019/2

2020/6

2020/7

2021/11

2021/3

2021/4

2021/6

2021/8

2022/8

2023/10

2023/7

Most Recent Post

Multicast Ipv4 and Ipv6 in Java / Kotlin

I recently ran into a peculiarity of multicast in Java / Kotlin. I was using a MulticastSocket: [https://docs.oracle.com/javase/8/docs/api/java/net/MulticastSocket.html](https://docs.oracle.com/javase/8/docs/api/java/net/MulticastSocket.html) and trying to ensure that it winds up bound to either an Inet4Address or Inet6Address. It turns out that even if I did something like: ``` val multicastSocket = MulticastSocket(InetSocketAddress("0.0.0.0", MULTICAST_DEFAULT_PORT)) assert(multicastSocket.localAddress is Inet4Address) ``` The assertion could fail. Similarly if I did: ``` val multicastSock ...