ProudNet.Eng
WebsiteProud ConsoleLanguage
  • 🌐ProudNet
    • ProudNet Introduction
    • Download and Install
      • How to verify your ProudNet license
      • AMI
    • Project Settings
      • C++
      • C#
      • Mac Xcode
      • Linux
      • Unity3D
        • iOS Build
      • Unreal Engine 4
      • Running the PIDL Compiler
    • Using ProudNet
      • Server and Client
        • Utilization of Server
        • Utilization of Client
      • RMI
        • Utilization of RMI
      • PIDL
        • Utilization of PIDL
      • Event handling
      • Communication messages
      • P2P Communication
        • Using P2P communication
    • Utilization of ProudNet
      • How to use
      • Tips for performance
    • Using DB in ProudNet
      • DB Cache System ver.2
        • DB Cache Theory and Understanding
        • Install DB Cache and Set Up Network
        • DB Cache Server and Client
        • DB Cache usage and application
          • Utilization of DB Cache
      • ADO API
      • ODBC API
    • ProudNet Utility
  • ProudNet Note
    • Technical Notes
      • Main Loop
      • Setting up a server firewall
      • Encryption and decryption
      • What to do in case of an error
      • List of error messages
      • Synchronizing Character Position
      • Client-Server Communication
      • MiniDump (Error Dump System)
      • [Version 1.6] Server-to-Server LAN Communicator
    • Glossary
    • Sample examples
  • 🌐Proud Service
    • Guide for Console
    • ProudChat
      • Download SDK
        • C++
        • C#
        • Unity3D
        • Unreal Engine 4
      • Features in Console
Powered by GitBook
On this page
  • Handling Timer Loop, RMI, and Events
  • Getting various information
  • Communicating between servers
  • Back
  1. ProudNet
  2. Using ProudNet
  3. Server and Client

Utilization of Server

Last updated 1 year ago

Handling Timer Loop, RMI, and Events

You don't have to call it every hour on the server, but if you want to do something every certain amount of time, you'll need to specify a timer callback function, a callback period, and custom data to pass to the callback function when you start the server.

Below is where to specify them

Language
Timer callback function
Callback period
Custom data

C++

Proud.INetServerEvent.OnTimerCallback

Proud.CStartServerParameter.m_timerCallbackInterval

Proud.CStartServerParameter.m_timerCallbackContext

C#

Nettention.Proud.NetServer.TickDelegate

Nettention.Proud.StartServerParameter.timerCallbackIntervalMs

-

Reference

Getting various information

Server allows you to get the client list, P2P group information, client IP information, ping time, and more.

C++ Functions
C# Functions
Description

Proud.CNetServer.GetClientCount

Nettention.Proud.NativeNetServer.GetClientCount

Gets the number of connected clients.

Proud.CNetServer.GetClientHostIDs

Nettention.Proud.NetServer.GetClientHostIDs

Get a list of HostIDs of connected clients.

Proud.CNetServer.GetClientInfo

Nettention.Proud.NetServer.GetClientInfo

Gets information about the client with the HostID given as a parameter.

Proud.CNetServer.GetJoinedP2PGroups

-

Gets all the p2p groups that the client with the HostID given as a parameter belongs to.

Proud.CNetServer.GetLastUnreliablePingMs

Nettention.Proud.NetServer.GetLastUnreliablePingMs

Returns the most recently taken ping time in milliseconds.

Proud.CNetServer.GetP2PGroupInfo

Nettention.Proud.NetServer.GetP2PGroupInfo

Gets the information for the P2P group given by the parameters.

Proud.CNetServer.GetP2PGroups

-

Get all P2P groups.

Proud.CNetServer.GetRecentUnreliablePingMs

Nettention.Proud.NetServer.GetRecentUnreliablePingMs

Returns the most recently taken ping time in milliseconds.

Proud.CNetServer.GetRemoteIdentifiableLocalAddrs

-

Get the server's listening port address that the client can recognise.

Proud.CNetServer.GetStats

Nettention.Proud.NetServer.GetStats

Gets server status information.

Proud.CNetServer.GetTcpListenerLocalAddr

Nettention.Proud.NetServer.GetTcpListenerLocalAddr

Gets all local addresses with which TCP communication is possible.

Proud.CNetServer.GetTimeMs

Nettention.Proud.NetServer.GetTimeMs

Get the current server time in ms.

Proud.CNetServer.GetUdpListenerLocalAddrs

-

Gets all local addresses that are Udp communicable.

Proud.CNetServer.IsConnectedClient

Nettention.Proud.NativeNetServer.IsConnectedClient

Returns whether the client with the HostID given as a parameter is connected.

Communicating between servers

If the servers work in a role-sharing manner, they need to establish a connection to each other for communication between each server. At this point, P2P groups can be used to facilitate server-to-server communication.

  • Set one Farm server. A LAN group where server computers exist is called a server farm.

  • All other servers have P2P communication between Farm Clients that connect to the farm server.

Each farm client, or server process, can communicate directly with each other regardless of whether it is a server or a client. Random forms of mesh communication are possible and free dependencies between them can be established.

The use of net_main is recommended for server-to-server communication, and the message_length of the communication should also be considered.

Reference


🌐
Server Farm from Wiki
⬅️
Back
Receive and event callback on the server
Timer callback on the server