[dylan-foundry/posix-sockets] 6ece1c: [posix-sockets] s-a-internet-address returns strin...

GitHub <[email protected]> Thu, 26 Nov 2015 23:43:40 -0800
Newsgroups gmane.comp.lang.dylan.gwydion.cvs
Message-ID <565809ac2351c_63bd3ff2659672a01435f8@hookshot-fe5-cp1-prd.iad.github.net.mail>
  Branch: refs/heads/master
  Home:   https://github.com/dylan-foundry/posix-sockets
  Commit: 6ece1c9ac5f86adc6df420046854288d55b027c0
      https://github.com/dylan-foundry/posix-sockets/commit/6ece1c9ac5f86adc6df420046854288d55b027c0
  Author: Bruce Mitchener <[email protected]>
  Date:   2015-11-27 (Fri, 27 Nov 2015)

  Changed paths:
    M posix-sockets/socket-address.dylan

  Log Message:
  -----------
  [posix-sockets] s-a-internet-address returns string.

This is a lot safer than returning the struct and will be easier
to fix once we fix how we handle raw structs at the FFI level.

We can just run %inet-ntop here and get back the string and return
that instead.

* posix-sockets/socket-address.dylan
  (socket-address-internet-address): Use the in_addr / in6_addr
   along with inet_ntop and return the string form of the internet
   address involved.


  Commit: dd07f25922853b3affb0615d9f535f62f2a871d5
      https://github.com/dylan-foundry/posix-sockets/commit/dd07f25922853b3affb0615d9f535f62f2a871d5
  Author: Bruce Mitchener <[email protected]>
  Date:   2015-11-27 (Fri, 27 Nov 2015)

  Changed paths:
    M posix-sockets/library.dylan
    M posix-sockets/module-posix-sockets.dylan
    M posix-sockets/socket-address.dylan

  Log Message:
  -----------
  [posix-sockets] print-object, as(<string>) for socket addresses.

* posix-sockets/socket-address.dylan
  (as on <socket-inet-address>): Combine address and port into
   a single result string.
  (as on <socket-inet6-address>): Likewise, but wrap the address
   in [] as is typical for IPv6 address display.
  (print-object on <socket-address>): Implement using as(<string>), ...).

* posix-sockets/library.dylan
  (library posix-sockets): Use dylan (for dylan-extensions) and
   io (for print, streams).

* posix-sockets/module-posix-sockets.dylan
  (module posix-sockets): Use dylan-extensions for object class,
   print to get the generic for print-object, and streams for write
   and write-element.


Compare: https://github.com/dylan-foundry/posix-sockets/compare/80f72ef5ff4d...dd07f2592285

_______________________________________________
chatter mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/chatter