Skip to content

Connectivity Options

SmartFoxServer 3 offers multiple connectivity options to support a large number of client platforms. With SFS3 you can have many different client types (mobile, desktop, web-based) communicating with each other through a number of different protocols.

Let's take a quick look:

TCP (and BlueBox)

TCP is the preferred transport protocol for connecting to SmartFoxServer as it is the fastest and most light-weight. By default SFS3 listens for TCP connections on port 9977.

TCP is recommended for both desktop and mobile games and, via our Reconnection System, it allows transparent reconnection in case of a sudden interruption.

In case a TCP connection fails from the get-go the API will automatically attempt a connection via HTTP tunnel (called BlueBox), which can bypass local firewalls or proxies and provide a backup option in limited access networks.

WebSocket

WebSocket is the primary alternative for web-based clients as direct TCP is not allowed in browsers. The default port for a connection is 8088 (unencrypted) or 8843 (SSL encrypted). SmartFoxServer 3 also provides transparent reconnection as with TCP, however there is no backup HTTP tunnelling option for WebSocket connections.

Also no direct UDP connections are available in the browser.

UDP

UDP is provided as a secondary channel of transmission for specific tasks such as audio streaming or fast updates in real-time games.

With SmartFoxServer 3 we have introduced our brand of specialized UDP protocols called RDP (Revamped Datagram Protocol), built on top of UDP, to provide multiple transport and quality of service options. To learn more about RDP see the dedicated article.

Finally SFS3 provides a TCP-fallback mechanism for clients that fail to communicate via the standard UDP port (UDP 9977), redirecting the UDP traffic to TCP.

Connectivity recap

This is a quick recap of the connectivity options available based on the client API in use:

Client API Platform Connectivity options
C#/DotNet Unity, Godot, .Net TCP / BlueBox / UDP / WebSocket
JavaScript HTML WebSocket
Java Android / Java TCP / BlueBox / UDP

As mentioned in the introduction, clients with different types of connections can interact seamlessly with each other.