Click here to Skip to main content
15,896,500 members
Articles / Web Development / HTML5

Building a basic HTML5 client/server application

Rate me:
Please Sign up or sign in to vote.
4.84/5 (50 votes)
4 Mar 2015CPOL4 min read 280.6K   16.4K   171  
This article is about a basic implementation of HTML5 client/server chat application.
#ifndef WEBSOCKET_APPLICATIONS_CHAT_PARTICIPANT_HPP
#define WEBSOCKET_APPLICATIONS_CHAT_PARTICIPANT_HPP

#include <string>
#include <boost/shared_ptr.hpp>
#include "dataframe.hpp"

namespace websocket {
    namespace applications {
        namespace chat {

            class participant
            {
            public:
                virtual ~participant() {}
                virtual void deliver(dataframe msg) = 0;
                virtual std::string get_id() = 0;
            };

            typedef boost::shared_ptr<participant> participant_ptr;
            
        } // chat
    } // namespace applications
} // namespace websocket

#endif // WEBSOCKET_APPLICATIONS_CHAT_PARTICIPANT_HPP

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Russian Federation Russian Federation
Niko Bellic (Serbian: Niko Belić) is the main protagonist and playable character in the video game Grand Theft Auto IV. He is a 30 year old former soldier who moved to Liberty City to escape his troubled past and pursue the American Dream.

Comments and Discussions