Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature: OS-chosen port available to application #703

Open
@eile

Description

@eile

Use case: I want to let the OS choose the port by supplying port 0 during initialization. This allows multiple applications to run concurrently, and the actual port will be communicated e.g. through zeroconf to the user.

I need to know the port chosen from the application, e.g., by having an API on the server to query the used address and port.

For example, inhttps://github.com/HBPVIS/ZeroEQ/blob/0.6.0/tests/http/server.cpp#L244 the URI has port 0 by default, and the URI returned after initialization in line 255 will contain the chosen port so that the client can connect to the server.

API proposal:

class Server{    std::string port() const; // >0 after listen, 0 otherwise    std::string address() const;};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp