aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/Server.cs
diff options
context:
space:
mode:
authorwilliam341 <[email protected]>2017-05-28 12:37:00 -0700
committerGitHub <[email protected]>2017-05-28 12:37:00 -0700
commit771c20cfb3a703e0f1550fdcf9eb07b78298c944 (patch)
tree59cb532e15ebff313fdba2be264d78ec0033f407 /ShiftOS_TheReturn/Server.cs
parent496b0cbf8659c99203f48210fd39c572400ae623 (diff)
parentc7ba7d733c756d196f98dd4533289a1ef4db715f (diff)
downloadshiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.tar.gz
shiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.tar.bz2
shiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.zip
Merge pull request #1 from shiftos-game/master
welp, no longer a dev.
Diffstat (limited to 'ShiftOS_TheReturn/Server.cs')
-rw-r--r--ShiftOS_TheReturn/Server.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/ShiftOS_TheReturn/Server.cs b/ShiftOS_TheReturn/Server.cs
new file mode 100644
index 0000000..ddbd15b
--- /dev/null
+++ b/ShiftOS_TheReturn/Server.cs
@@ -0,0 +1,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; }
+
+ }
+}