code: function selectEndPoint (local) {
    var endPoint;
    // Use an existing datagram socket if one exists.
    if (local.port == 0) {
      endPoint = createEndPoint(local);
    } else if (!(endPoint = lookupEndPoint(local))) {
      endPoint = createEndPoint(local);
    }
    return endPoint;
  }
docs: TODO: Consolidate.