Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
S slapos.toolbox
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • 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
None
Milestone
None
Assign milestone
Time tracking
Source branch: unix_socket_promise
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7