stromcode openchat
Download
Skip this Video
Download Presentation
Stromcode OpenChat

Loading in 2 Seconds...

play fullscreen
1 / 13

Stromcode OpenChat - PowerPoint PPT Presentation


  • 114 Views
  • Uploaded on

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)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Stromcode OpenChat' - vadin


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
ad