Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • S slapos.toolbox
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedi
  • slapos.toolbox
  • Merge requests
  • !97

Merged
Created Jun 14, 2021 by Xavier Thompson@xavier_thompsonOwner

promise/plugin: Add check_socket_listening promise

  • Overview 14
  • Commits 1
  • Changes 3

This promise generalizes the check_port_listening promise to include AF_UNIX sockets in addition to AF_INET and AF_INET6 host/port sockets.

The socket family and address is deduced from the set of arguments:

  • host & port: AF_INET or AF_INET6
  • pathname: filesystem pathname address for AF_UNIX
  • abstract: '\0' is prefixed to build an abstract AF_UNIX address

All other combinations of arguments are forbidden.

The promise creates a socket accordingly and attempts to connect to the provided address. The promise fails if the connection fails.

The check_port_listening promise now inherits from this implementation.

Edited Jun 21, 2021 by Xavier Thompson
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: unix_socket_promise
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7