Skip to content

Conversation

@hoangphuoc25
Copy link

@hoangphuoc25 hoangphuoc25 commented Sep 20, 2019

This will allow code written in async/await style, e.g.

const Promise = require('bluebird');
const stompit = require('stompit');
Promise.promisifyAll(stompit);

async function asyncEntry() {
    while (true) {
        let client = await stompit.connectAsync(connectOptions);        
        let message = await client.subscribeAsync(subscribeHeaders);
        let body = await message.readStringAsync('utf-8');
        console.log(body);
    }
}

Copy link

@Dadibom Dadibom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no issues with this

@Dadibom
Copy link

Dadibom commented Jan 24, 2020

Altough a cleaner solution would be to move IncomingFrame to it's own file

@paul-uz
Copy link

paul-uz commented Jun 10, 2022

@gdaws can this get merged? I desparately need to use this library with async/await

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants