PUN Classic (also called PUN1) is the original and first major version of PUN.
It is now replaced by PUN2 which is refactored and enhanced.
We highly recommend starting new projects with PUN2 and if possible migrating existing ones from PUN1 to PUN2 by following our "Migration Notes".
PUN Classic will be maintained for the coming months.
We will fix important bugs and support new Unity versions but new features will be added only to PUN2.
pun
| v1
switch to v2
TCP and UDP Port Numbers
Photon Cloud
Connecting to Photon Cloud might require, depending on the API, to pass in the proper port for the protocol and purpose of your application. In most cases, you don't have to worry about port numbers. The table below contains the default ports to be used with Photon Cloud per protocol and per server connection.
Default Ports By Protocol And Purpose
Port Number | Protocol | Purpose |
---|---|---|
5058 or 27000 | UDP | Client to Nameserver (UDP) |
5055 or 27001 | UDP | Client to Master Server (UDP) |
5056 or 27002 | UDP | Client to Game Server (UDP) |
4533 | TCP | Client to Nameserver (TCP) |
4530 | TCP | Client to Master Server (TCP) |
4531 | TCP | Client to Game Server (TCP) |
19093 | TCP | Client to Nameserver (Secure WebSockets) |
19090 | TCP | Client to Master Server (Secure WebSockets) |
19091 | TCP | Client to Game Server (Secure WebSockets) |