Stromcode openchat
This presentation is the property of its rightful owner.
Sponsored Links
1 / 13

Stromcode OpenChat PowerPoint PPT Presentation


  • 76 Views
  • Uploaded on
  • Presentation posted in: General

Stromcode OpenChat. Extendable Chat Server Specification + Protocol. Goals. Design a thorough application specification Create a simple communication protocol Implement several advanced, modern application functions XML configuration files Plug-in hosting (DLL)

Download Presentation

Stromcode OpenChat

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Stromcode openchat

Stromcode OpenChat

Extendable Chat Server

Specification + Protocol


Goals

Goals

  • Design a thorough application specification

  • Create a simple communication protocol

  • Implement several advanced, modern application functions

    • XML configuration files

    • Plug-in hosting (DLL)

    • Cross-platform communication

    • Version checking

    • Directory listing

    • Compact HTTP serving with PHP scripting

  • To create something I can keep working on


Functionality

Functionality

  • XML parsing

    • MSXML, TinyXML

    • DTD

      • Not required


Functionality1

Functionality

  • PHP

    • PHP-CLI – no C++ support!

    • CPHPParser class

      • PHP.net

      • Windows pipes

        • Typically non-intuitive & poorly documented

        • Win32 | console vs console | console

        • Use CreatePipe & CreateProcess

        • Don’t use _popen!


Functionality2

Functionality

  • More PHP

    • How to expose program data to external PHP scripts?

      • Load .php file

      • Construct array definition string

      • Push both to PHP-CLI


Functionality3

Functionality

  • Version Checking

    • Application opens HTTP connection to version checking server

    • Application pushes GET data

    • Version Check server processes GET and returns text

    • Application parses text for requested data


Functionality4

Functionality

  • Directory Listing

    • Not implemented in this version

    • Similar to Version Checking

    • Directory server simply adds application supplied information to the database and updates a timestamp


Functionality5

Functionality

  • Cross-platform Communication

    • How to terminate a communicated string?

      • \n

      • \r

      • \r\n

    • Problem: scanning for \n character

      • Loss of data if not careful

      • Buffer too long (client pushes too much data before \n)


Functionality plug in hosting

Functionality: Plug-in Hosting

  • Plug-ins as objects

    • DLL exposes functions

      • CreateObject

        • Returns pointer to new object

        • Object created in DLL space!

      • DestroyObject

        • Deletes object

    • Must be done like this because of distinct heaps


Functionality plug in hosting1

Functionality: Plug-in Hosting

//////////////////////////////////////////////////////////////////

// CreateClassInstance

//////////////////////////////////////////////////////////////////

extern "C" SERVERPLUGIN_API void* CreateClassInstance() {

return (void*) (new GDtServerPlugin);

}

//////////////////////////////////////////////////////////////////

// DeleteClassInstance

//////////////////////////////////////////////////////////////////

extern "C" SERVERPLUGIN_API void DeleteClassInstance(GDtServerPluginInterface* obj) {

delete obj;

}


Functionality plug in hosting2

Functionality: Plug-in Hosting

  • Memory issues

    • Heaps

      • Host

      • Plug-in

      • Visual Studio

    • Returning values

      • Who deletes it?


Functionality plug in hosting3

Functionality: Plug-in Hosting

  • Returning values (in depth)

    • Application function calls member method of plug-in object.

    • Member method of the plug-in object returns a value.

    • Function exits. What happens?


The future

The Future

  • What’s Done

    • Solid Framework

      • Easily extendable

        • Plug-ins, plug-in types, commands and features

  • What’s Next?

    • Three new plug-in types

    • Focus on the client

    • More protocol commands

    • Rooms


  • Login