Click here to Skip to main content
15,891,316 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: 'else' statements: the cockroaches of programming? Pin
Pete O'Hanlon4-Jul-15 10:52
mvePete O'Hanlon4-Jul-15 10:52 
GeneralRe: 'else' statements: the cockroaches of programming? Pin
Eddy Vluggen5-Jul-15 0:38
professionalEddy Vluggen5-Jul-15 0:38 
GeneralRe: 'else' statements: the cockroaches of programming? Pin
mickan5-Jul-15 8:01
professionalmickan5-Jul-15 8:01 
AnswerRe: 'else' statements: the cockroaches of programming? Pin
Richard Andrew x644-Jul-15 11:11
professionalRichard Andrew x644-Jul-15 11:11 
GeneralRe: 'else' statements: the cockroaches of programming? Pin
mickan5-Jul-15 8:06
professionalmickan5-Jul-15 8:06 
GeneralRe: 'else' statements: the cockroaches of programming? Pin
Richard MacCutchan5-Jul-15 21:38
mveRichard MacCutchan5-Jul-15 21:38 
GeneralRe: 'else' statements: the cockroaches of programming? Pin
jschell10-Jul-15 14:32
jschell10-Jul-15 14:32 
QuestionJust released the latest version of my open source project... Pin
Corvusoft21-Jun-15 21:51
Corvusoft21-Jun-15 21: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 22:19
mveRichard MacCutchan21-Jun-15 22:19 
AnswerRe: Just released the latest version of my open source project... Pin
Pete O'Hanlon21-Jun-15 22:51
mvePete O'Hanlon21-Jun-15 22:51 
GeneralRe: Just released the latest version of my open source project... Pin
Corvusoft21-Jun-15 23:44
Corvusoft21-Jun-15 23:44 
GeneralRe: Just released the latest version of my open source project... Pin
Pete O'Hanlon21-Jun-15 23:54
mvePete O'Hanlon21-Jun-15 23:54 
QuestionReal time RTDS Feeds from nse SIte Pin
Member 1178089120-Jun-15 23:11
Member 1178089120-Jun-15 23:11 
AnswerRe: Real time RTDS Feeds from nse SIte Pin
Richard MacCutchan21-Jun-15 1:35
mveRichard MacCutchan21-Jun-15 1:35 
QuestionDistributed Parallel ETL Load processing Pin
OMalleyW16-Jun-15 2:59
OMalleyW16-Jun-15 2:59 
QuestionStruggling to Fix the Syntax Error in WordPress Pin
Lucy Barret11-Jun-15 2:50
professionalLucy Barret11-Jun-15 2:50 
QuestionSingleton Pattern - Different Flavors Pin
FabioI21-May-15 1:05
FabioI21-May-15 1:05 
AnswerRe: Singleton Pattern - Different Flavors Pin
Pete O'Hanlon21-May-15 1:17
mvePete O'Hanlon21-May-15 1:17 
GeneralRe: Singleton Pattern - Different Flavors Pin
FabioI26-May-15 4:50
FabioI26-May-15 4:50 
AnswerDependency injection for reporting user control(solved) Pin
GuyThiebaut12-May-15 0:53
professionalGuyThiebaut12-May-15 0:53 
Questionhow make conect two computer in c# Pin
naif7776-May-15 21:23
naif7776-May-15 21:23 
AnswerRe: how make conect two computer in c# Pin
Sascha Lefèvre7-May-15 0:58
professionalSascha Lefèvre7-May-15 0:58 
GeneralRe: how make conect two computer in c# Pin
Amarnath S12-Jun-15 0:05
professionalAmarnath S12-Jun-15 0:05 
JokeRe: how make conect two computer in c# Pin
Eddy Vluggen12-Jun-15 0:20
professionalEddy Vluggen12-Jun-15 0:20 
AnswerRe: how make conect two computer in c# Pin
Keld Ølykke13-Jun-15 7:27
Keld Ølykke13-Jun-15 7: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.