Version: 2018.4
LanguageEnglish
  • C#
Method group is Obsolete

NetworkServerSimple

class in UnityEngine.Networking

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Obsolete The high level API classes are deprecated and will be removed in the future.

Description

The NetworkServerSimple is a basic server class without the "game" related functionality that the NetworkServer class has.

This class has no Scene management, spawning, player objects, observers, or static interface like the NetworkServer class. It is simply a server that listens on a port, manages connections, and handles messages. There can be more than one instance of this class in a process.

Like the NetworkServer and NetworkClient classes, it allows the type of NetworkConnection class created for new connections to be specified with SetNetworkConnectionClass(), so custom types of network connections can be used with it.

This class can be used by overriding the virtual functions OnConnected, OnDisconnected and OnData; or by registering message handlers.