Click here to Skip to main content
15,565,530 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: 'else' statements: the cockroaches of programming? Pin
Pete O'Hanlon4-Jul-15 11:52
mvaPete O'Hanlon4-Jul-15 11:52 
GeneralRe: 'else' statements: the cockroaches of programming? Pin
Eddy Vluggen5-Jul-15 1:38
professionalEddy Vluggen5-Jul-15 1:38 
GeneralRe: 'else' statements: the cockroaches of programming? Pin
mickan5-Jul-15 9:01
professionalmickan5-Jul-15 9:01 
AnswerRe: 'else' statements: the cockroaches of programming? Pin
Richard Andrew x644-Jul-15 12:11
professionalRichard Andrew x644-Jul-15 12:11 
GeneralRe: 'else' statements: the cockroaches of programming? Pin
mickan5-Jul-15 9:06
professionalmickan5-Jul-15 9:06 
GeneralRe: 'else' statements: the cockroaches of programming? Pin
Richard MacCutchan5-Jul-15 22:38
mveRichard MacCutchan5-Jul-15 22:38 
GeneralRe: 'else' statements: the cockroaches of programming? Pin
jschell10-Jul-15 15:32
jschell10-Jul-15 15:32 
QuestionJust released the latest version of my open source project... Pin
Corvusoft21-Jun-15 22:51
Corvusoft21-Jun-15 22:51 
I'd love to hear any feed back regarding design, style and architecture.

You can find the source at http://github.com/corvusoft/restbed.

Asynchronous RESTful framework
C++
#include <memory>
#include <cstdlib>
#include <restbed>

using namespace std;
using namespace restbed;

void get_method_handler( const shared_ptr< Session >& session )
{
    const auto request = session->get_request( );

    size_t content_length = 0;
    request->get_header( "Content-Length", content_length );

    session->fetch( content_length, [ ]( const shared_ptr< Session >& session,
                                         const Bytes& body )
    {
        fprintf( stdout, "%.*s\n", ( int ) body.size( ), body.data( ) );

        session->close( OK, "Hello, World!", { { "Content-Length", "13" } } );
    } );
}

int main( const int, const char** )
{
    auto resource = make_shared< Resource >( );
    resource->set_path( "/resource" );
    resource->set_method_handler( "GET", get_method_handler );

    auto settings = make_shared< Settings >( );
    settings->set_port( 1984 );
    settings->set_default_header( "Connection", "close" );

    Service service;
    service.publish( resource );
    service.start( settings );

    return EXIT_SUCCESS;
}


Was told to remove this from the C++ threads. Please let me know if this is still not the right place for this?
AnswerRe: Just released the latest version of my open source project... Pin
Richard MacCutchan21-Jun-15 23:19
mveRichard MacCutchan21-Jun-15 23:19 
AnswerRe: Just released the latest version of my open source project... Pin
Pete O'Hanlon21-Jun-15 23:51
mvaPete O'Hanlon21-Jun-15 23:51 
GeneralRe: Just released the latest version of my open source project... Pin
Corvusoft22-Jun-15 0:44
Corvusoft22-Jun-15 0:44 
GeneralRe: Just released the latest version of my open source project... Pin
Pete O'Hanlon22-Jun-15 0:54
mvaPete O'Hanlon22-Jun-15 0:54 
QuestionReal time RTDS Feeds from nse SIte Pin
Member 1178089121-Jun-15 0:11
Member 1178089121-Jun-15 0:11 
AnswerRe: Real time RTDS Feeds from nse SIte Pin
Richard MacCutchan21-Jun-15 2:35
mveRichard MacCutchan21-Jun-15 2:35 
QuestionDistributed Parallel ETL Load processing Pin
OMalleyW16-Jun-15 3:59
OMalleyW16-Jun-15 3:59 
QuestionStruggling to Fix the Syntax Error in WordPress Pin
Lucy Barret11-Jun-15 3:50
professionalLucy Barret11-Jun-15 3:50 
QuestionSingleton Pattern - Different Flavors Pin
FabioI21-May-15 2:05
FabioI21-May-15 2:05 
AnswerRe: Singleton Pattern - Different Flavors Pin
Pete O'Hanlon21-May-15 2:17
mvaPete O'Hanlon21-May-15 2:17 
GeneralRe: Singleton Pattern - Different Flavors Pin
FabioI26-May-15 5:50
FabioI26-May-15 5:50 
AnswerDependency injection for reporting user control(solved) Pin
GuyThiebaut12-May-15 1:53
professionalGuyThiebaut12-May-15 1:53 
Questionhow make conect two computer in c# Pin
naif7776-May-15 22:23
naif7776-May-15 22:23 
AnswerRe: how make conect two computer in c# Pin
Sascha Lefèvre7-May-15 1:58
professionalSascha Lefèvre7-May-15 1:58 
GeneralRe: how make conect two computer in c# Pin
Amarnath S12-Jun-15 1:05
professionalAmarnath S12-Jun-15 1:05 
JokeRe: how make conect two computer in c# Pin
Eddy Vluggen12-Jun-15 1:20
professionalEddy Vluggen12-Jun-15 1:20 
AnswerRe: how make conect two computer in c# Pin
Keld Ølykke13-Jun-15 8:27
Keld Ølykke13-Jun-15 8:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.