Code Monkey home page Code Monkey logo

times's Introduction

Times - Server [World]

An C# Event driven, multi threaded AS3 CPPS Emulator. This is world/game server, check other branches for other types of server.

THIS IS FOR THE WORLD SERVER. View more branches for different types of server.

Visit https://times-0.github.io/Times/ To view Times docs.

Usage

  • All you need to do is, add this file to your C# Solution.

SETUP

  • Then, to get the debug available you must implement your-wished custom Debug-handler, and catch the debug events using Log > Debugger class.
  • You must also specify the type of server, you are running. Either a Login or World or Redeem server. Currently this has no advantage of multi-server processing.
  • You need to create a new solution, or compile this once-again to create another type of server. The Server-type can be changed in Shell.cs

Handling Packets and Custom-callback handlers

This uses a custom event based class, that handles all the Packet-event received. If any packet is malformed or not recognized, anything than XT and XML Type ain't recognized the server will kick the user. All the packets are received by an async loop that runs parallel with every other penguins connected. This server, converts all packet received into a special format, to handle that packets, as mentioned in Packets.cs:

  • XT : Format = #xtCATEGORY-HANDLER/, where category is like "s", "z", and handler is for example, "j#jr", "j#js" etc..,.
  • XML : Format = #xmlACTION/, where ACTION is the attribute "action" contained in "body" tag.

The handler will then call the function, which corresponds to the callback-format as said above. The callback method will be given the following parameters resp,

Event = {type=callback-name, client=penguin.cs class}, vars = For XT, the remainig vars after "-1 or intid"; for XML, the body tag-class itself.

You no need to import the classes that handles callback. All you need to do is, create a new .cs file in Client/Dependencies and the Server will auto add it in runtime. LoginHandler is one of the example.

DEPENDENCIES

  • XmlToDynamic
  • MySQL :: Data, auto-installed when installed MySQL in PC
  • .NET Framework 4 +, install the latest if you have anything lesser than 4.
  • MS Linq
  • XMLSerializer :: Linq, add to reference if not available
  • Sockets, auto added in reference.

STARTING THE SERVER

First of all you have to do this to init a server.

var worldServer = new Airtower("IP/HOST NAME", port);
var Shell = new Shell();

Next, do all the remaining stuffs you need to setup before you start the server. Then atlast, to start the server execute.

worldServer.startConnection();

CONTRIBUTION

Feel free to contribute anything to this server. It can be any bugs, glitch fixes, updates, security improvement, handlers, ideas, performance fixes, etc..,.

times's People

Contributors

december364 avatar valid22 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.