nats-io / nats.swift

Swift client for NATS, the cloud native messaging system.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default ports in connection URLs

mtmk opened this issue · comments

commented

Proposed change

Automatically assign ports on well known URL schemes:
nats, tls: 4222
ws: 80
wss: 443

Currently it's an error if port is not provided.

Use case

This might be very convenient especially on websocket connections since it is a well used convention in web applications to not provide default ports.