• Examples (iOS)
• Examples (Android)
• Examples (C++)
Server API Documentation

 

» SmartFoxServer 2X platform stack

In this document we take a bird’s eye view at the SmartFoxServer 2X platform and briefly discuss each of the components in the stack. Starting at the core of the server we find the network engine (codename BitSwarm) which is the third incarnation of the original socket engine built for SmartFoxServer 1.x. This layer provides unique features to SFS2X that are typically not found in other competitor’s solutions (we discuss all the technical details in a separate comprehensive white paper).

In essence BitSwarm provides TCP/UDP connectivity, Session management, network security tools, the HRC (High-Resilient-Connections) system, clustering services, monitoring and more, using an highly scalable non-blocking design.

Platform Stack

» Core Services and Managers

The lower layer of SmartFoxServer 2X provides a number of essential services and managers such as configuration services, logging, security, task scheduling, zone/room/user management, buddy lists, banned user management, remote administration, email services, HTTP services, database integration and lots more.

All these services coalesce in a well organized set of Server API that provide developers a host of high level functionalities acting as the building blocks of their applications.

» Server-side API and Extensions

Extensions are the mechanism by which developers can plug their own application logic in the system and leverage the Server API. In a similar way to a servlet container, the SFS2X framework provides an efficient way to handle custom client requests and server events. Rapid development is guaranteed by a rational workflow that provides hot-redeploy, automatic dependency discovery and a well-thought class loading mechanism.

» Client-side API

The topmost element in the stack is the public API, which is exposed directly to the clients. Any application speaking the SFS2X protocol can access this API and interact with the server very easily and securely.

The client libraries also provide a consistent framework across all supported platforms, making it very easy to create multiple clients in Flash, Unity, iPhone and iPad, Android devices, etc. The following table shows all the supported platforms and languages.

API language

Platform

ActionScript 3 C# Java Objective C JavaScript C++
Flash
Web player
Standalone
         
Unity
Web player
Standalone
         
iOS
iPhone
iPad
iPod Touch
   
Android    
HTML5        
Unreal Engine          
Java2 SE          
Mac OS X      
tvOS
AppleTV
       
Windows Universal
Windows 8.1
Windows 10
Windows Phone 8.1
Windows 10 Mobile
         
.Net / Mono          
  Others (*)      

= native | = Unity publishing | = Adobe Air publishing
(*) APIs behavior with other platforms (Blackberry, PS3, XBox, Wii, etc) not tested directly.

Launching a new game, interacting with friends in the buddy-list or moderating a chat is a matter of a few method calls. Additionally the client can access all the extra functionalities exposed by the custom Extensions, offering a limitless set of possibilities.