#BUGFIX by stefan
authorStefan Vogel <sv@exept.de>
Mon, 02 Mar 2020 20:40:22 +0100
changeset 5463 c6a3af27138d
parent 5462 83d68b10da13
child 5464 7f31945df4b1
#BUGFIX by stefan class: IPSocketAddress class added: #hostAddress: 16-byte-addresses are IPv6 addresses
IPSocketAddress.st
--- a/IPSocketAddress.st	Wed Feb 26 01:27:17 2020 +0100
+++ b/IPSocketAddress.st	Mon Mar 02 20:40:22 2020 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1995 by Claus Gittinger
 	      All Rights Reserved
@@ -127,6 +129,15 @@
     "Modified (comment): / 13-06-2018 / 11:00:04 / Claus Gittinger"
 !
 
+hostAddress:aByteArray
+    aByteArray size = 16 ifTrue:[
+        ^ IPv6SocketAddress new hostAddress:aByteArray.
+    ].
+    ^ self new hostAddress:aByteArray.
+
+    "Created: / 02-03-2020 / 19:03:44 / Stefan Vogel"
+!
+
 localHost
     "get a new instance representing the local-host address as seen internally"