From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- pipermail/nel/2001-July/000470.html | 129 ++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 pipermail/nel/2001-July/000470.html (limited to 'pipermail/nel/2001-July/000470.html') diff --git a/pipermail/nel/2001-July/000470.html b/pipermail/nel/2001-July/000470.html new file mode 100644 index 00000000..74ca6758 --- /dev/null +++ b/pipermail/nel/2001-July/000470.html @@ -0,0 +1,129 @@ + + + + [Nel] Snowballs building problem + + + + + + +

[Nel] Snowballs building problem

+ Daniel Miller + miller@nevrax.com
+ Tue, 3 Jul 2001 10:51:48 +0200 +

+
+ +
Your best bet for now is to look at the layer 4 code sample
+(http://www.nevrax.org/cvs/cvsweb.cgi/code/nel/samples/net_layer4)
+
+In this example the 'client' sends messages to the 'frontend', the
+'frontend' treats these messages and sends them to the 'ping service'. The
+'ping service' receives messages from the 'frontend', treats them and sends
+back new messages. The 'frontend' receives messages from the 'server',
+treats them and dispatches new messages to the 'client'...
+
+The following chunks of code in the 'frontend' is the key. You can extend
+the callback arrays to include messages for all the actions that the player
+can send to the shard:
+
+
+/*
+ * Callback array for messages received from a client
+ */
+TCallbackItem CallbackArray[] =
+{
+        { "PING", cbPing }        // when receiving a "PING" message, call
+cbPing()
+};
+
+
+/*
+ * Callback array for message received from the ping service
+ */
+TCallbackItem PingServiceCallbackArray[] =
+{
+        { "PONG", cbPong }        // when receiving a "PONG" message, call
+cbPong()
+};
+
+
+
+Snowballs, being based on an older version of NeL, is far less clean - the
+callback table contains a mixture of admin messages (such as "C" and "D"),
+and game messages (such as "PAN" and "SHO"). Otherwise the principles are
+the same.
+
+// Callback array as a server
+TCallbackItem CallbackArray [] =
+{
+        { "ES", cbServerProcessEntityState },
+        //{ "BT", cbSpawnBot },
+        { "C", cbConnect },
+        { "D", cbDisconnect },
+        //{ "RST", cbResetServer },
+        { "NAM", cbAssignName },
+        { "PAN", cbPan },
+        { "SHO", cbShoot },
+        { "RMW", cbProcessRemoveWeapon },
+        { "AUT", cbWelcome },
+        { "DUMP", cbDumpState },
+        { "CHAT", cbChat },
+        { "PING", cbPing },
+        { "PONG", cbPong }
+        //{ "ACC", cbGiveAccess } // this is for the test client. Remove it
+for a real use or any client can connect with any password !
+};
+
+-----Original Message-----
+From: nel-admin@nevrax.org [mailto:nel-admin@nevrax.org]On Behalf Of
+Yann Morvan
+Sent: Monday, July 02, 2001 8:05 PM
+To: nel@nevrax.org
+Subject: Re: [Nel] Snowballs building problem
+
+
+That was exactly why I wanted to have a look at Snowballs.
+The point I was particularly interested in was the mecanism
+used by the server to identify a player's action and call the
+matching piece of code, and how to define those "pieces of code".
+I've compiled the documentation, so I'll just have to look at it,
+but if you can think of informations I may have troubles to find,
+don't hesitate to tell me about it.
+
+	Yann
+
+_______________________________________________
+Nel mailing list
+Nel@nevrax.org
+http://www.nevrax.org/mailman/listinfo.cgi/nel
+
+
+
+ + + +
+

+ -- cgit v1.2.1