Bind to Specific IP

cetinsert edited this page Sep 6, 2014 · 1 revision

Starting with version 1.1, it is possible to specify a single numeric IPv6 or IPv4 address along with the usual port number for PortFusion server sockets.

This extension uses the AddrPort data structure and can be used at the following places in command line segments:

  ]   A   [          # A: AddrPort
p h - p h [ A        # p:     Port
A ] h p - h p        # h: Host
A ]     - h p

where

AddrPort → Port | IP:Port

When no IP is provided in an AddrPort, [::] is used for IPv6+4, IPv6 and 0.0.0.0 for IPv4 to listen on all addresses.

Example AddrPort Values

Listen all IPs one IP
IPv6(+4¹) 1234
[::]:1234
:::1234²
[::1]:1234
::1:1234²
IPv4 0.0.0.0:1234 127.0.0.1:1234
[127.0.0.1]:1234²

¹ except on Windows XP (no dual stack IP) and FreeBSD
² non-standard syntax allowed for consistency and the shell on FreeBSD

Note

This feature was implemented as an answer to a question by a commercial PortFusion user.

Contact

corsis

fusion@corsis.eu

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.