[dylan-foundry/posix-sockets] 0648c3: [posix-sockets] <socket-address> stores a copy of ...

GitHub <[email protected]> Wed, 25 Nov 2015 17:34:23 -0800
Newsgroups gmane.comp.lang.dylan.gwydion.cvs
Message-ID <5656619f69314_4e7c3fe31f93b2b8112460@hookshot-fe2-cp1-prd.iad.github.net.mail>
  Branch: refs/heads/master
  Home:   https://github.com/dylan-foundry/posix-sockets
  Commit: 0648c3a37e29c949fb40d7fe5901e2015686d5f2
      https://github.com/dylan-foundry/posix-sockets/commit/0648c3a37e29c949fb40d7fe5901e2015686d5f2
  Author: Bruce Mitchener <[email protected]>
  Date:   2015-11-26 (Thu, 26 Nov 2015)

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

  Log Message:
  -----------
  [posix-sockets] <socket-address> stores a copy of sockaddr.

To simplify memory management, we store a copy of the underlying
sockaddr struct within a byte buffer managed by the <socket-address>.
This eliminates the need for manual destruction or needing finalizers
as well as difficulties that could arise from data going out of scope
and getting destroyed at the native level.

* posix-sockets/socket-address.dylan
  (<socket-address>: Add socket-address-sockaddr-buffer to hold the
   sockaddr struct data.
  (make on <socket-address>): Based on the address family, create
   an instance of the appropriate socket address class. Copy the
   sockaddr data and create a <sockaddr*> that points to it and
   pass that along to the constructor for the appropriate socket
   address class.


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

  Changed paths:
    M posix-sockets/bindings.dylan
    M posix-sockets/module-posix-sockets.dylan

  Log Message:
  -----------
  [posix-sockets] Binding for getaddrinfo.

* posix-sockets/bindings.dylan
  (get-address-info): Wrapper for getaddrinfo that will fetch the
   data and then construct the appropriate <address-info> and
   <socket-address> objects and free the underlying data after
   conversion.

* posix-sockets/module-posix-sockets.dylan
  (module posix-sockets): Export get-address-info.


Compare: https://github.com/dylan-foundry/posix-sockets/compare/55ba12f36502...d5b7c95d6083

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