From 04347084d658baedd6dc615fa34b62d3c19f1d2e Mon Sep 17 00:00:00 2001 From: Mattes D Date: Wed, 28 Jan 2015 15:15:54 +0100 Subject: NetworkTest plugin: Added cNetwork:Connect test code. --- MCServer/Plugins/NetworkTest/Info.lua | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 MCServer/Plugins/NetworkTest/Info.lua (limited to 'MCServer/Plugins/NetworkTest/Info.lua') diff --git a/MCServer/Plugins/NetworkTest/Info.lua b/MCServer/Plugins/NetworkTest/Info.lua new file mode 100644 index 000000000..6bb639860 --- /dev/null +++ b/MCServer/Plugins/NetworkTest/Info.lua @@ -0,0 +1,46 @@ + +-- Info.lua + +-- Implements the g_PluginInfo standard plugin description + +g_PluginInfo = +{ + Name = "NetworkTest", + Version = "1", + Date = "2015-01-28", + Description = [[Implements test code (and examples) for the cNetwork API]], + + Commands = + { + }, + + ConsoleCommands = + { + net = + { + Subcommands = + { + client = + { + HelpString = "Connects, as a client, to a specified webpage (google.com by default) and downloads its front page using HTTP", + Handler = HandleConsoleNetClient, + ParameterCombinations = + { + { + Params = "", + Help = "Connects, as a client, to google.com and downloads its front page using HTTP", + }, + { + Params = "host [port]", + Help = "Connects, as a client, to the specified host and downloads its front page using HTTP", + }, + }, -- ParameterCombinations + }, -- client + }, -- Subcommands + }, -- net + }, +} + + + + -- cgit v1.2.3