blob: ddbd15b29fe4eee171b317d0c7cddb3240542761 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ShiftOS.Objects;
namespace ShiftOS.Engine
{
public interface Server
{
/// <summary>
/// Occurs when someone sends a message to the server.
/// </summary>
/// <param name="msg">The message from the client.</param>
void MessageReceived(ServerMessage msg);
}
[AttributeUsage(AttributeTargets.Class, AllowMultiple=false)]
public class ServerAttribute : Attribute
{
public ServerAttribute(string name, int port)
{
Name = name;
Port = port;
}
/// <summary>
/// Gets the name of the server.
/// </summary>
public string Name { get; }
/// <summary>
/// Gets the port of the server.
/// </summary>
public int Port { get; }
}
}
|