WorldServerDetails - jimdroberts/FishMMO GitHub Wiki
Serializable class containing details about a world server in FishMMO, including name, address, status, and player count. Used for server selection, status display, and network communication regarding available world servers.
-
public string Name
Name of the world server.
-
public DateTime LastPulse
Timestamp of the last server heartbeat or status update.
-
public string Address
IP address or hostname of the server.
-
public ushort Port
Port number for the server.
-
public int CharacterCount
Number of characters currently on the server.
-
public bool Locked
Indicates whether the server is locked (not accepting new connections).
- Create a
WorldServerDetails
instance and populate its fields with the server's information. - Use the class to display server status, filter available servers, or send server details over the network.
// Example 1: Creating a world server details object
WorldServerDetails server = new WorldServerDetails {
Name = "World 1",
LastPulse = DateTime.UtcNow,
Address = "world1.fishmmo.com",
Port = 7777,
CharacterCount = 120,
Locked = false
};
// Use server object in server list or status display
- Update the
LastPulse
field regularly to reflect the server's current status. - Use the
Locked
field to prevent new connections when the server is under maintenance or full. - Validate all fields before displaying or transmitting server details to ensure accuracy.