New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for websocket clients #1332

Merged
merged 6 commits into from Dec 2, 2015

Conversation

Projects
None yet
3 participants
@Kemonozume
Contributor

Kemonozume commented Nov 12, 2015

added ws/wss to the URL package
made changes to the Frame struct and Websocket class to allow it to be
used as a server and client.

added support for websocket clients
added ws/wss to the URL package
made changes to the Frame struct  and Websocket class to allow it to be
used as a server and client.
@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Nov 11, 2015

Looks like the above lines have been left over, but connectWebSocket should ideally go here anyway to be consistent with other modules (functions go before type declarations).

Looks like the above lines have been left over, but connectWebSocket should ideally go here anyway to be consistent with other modules (functions go before type declarations).

@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Nov 11, 2015

Minor naming convention: should be is_server (see here).

Minor naming convention: should be is_server (see here).

@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Nov 11, 2015

This should probably use a secure RNG from vibe.crypto.cryptorand, mainly for performance reasons.

This should probably use a secure RNG from vibe.crypto.cryptorand, mainly for performance reasons.

@Kemonozume

This comment has been minimized.

Show comment
Hide comment
@Kemonozume

Kemonozume Nov 12, 2015

Contributor

The ping/pong messages work properly, kinda missed the debug messages.
Im not sure how to replace the auto gen = Random(unpredictableSeed); with the secure RNG from vibe.crypto.cryptorand.

Contributor

Kemonozume commented Nov 12, 2015

The ping/pong messages work properly, kinda missed the debug messages.
Im not sure how to replace the auto gen = Random(unpredictableSeed); with the secure RNG from vibe.crypto.cryptorand.

Show outdated Hide outdated source/vibe/http/websockets.d
});
auto key = "sec-websocket-accept" in res.headers;
assert(key, answerKey);

This comment has been minimized.

@Geod24

Geod24 Nov 13, 2015

Contributor

You don't want an assert here, rather an enforce.

@Geod24

Geod24 Nov 13, 2015

Contributor

You don't want an assert here, rather an enforce.

@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Dec 2, 2015

Member

Thanks @Kemonozume, I think this looks good to merge now.

I'll also add a basic test project that sends a few messages between the client and server.

Member

s-ludwig commented Dec 2, 2015

Thanks @Kemonozume, I think this looks good to merge now.

I'll also add a basic test project that sends a few messages between the client and server.

s-ludwig added a commit that referenced this pull request Dec 2, 2015

Merge pull request #1332 from Kemonozume/master
added support for websocket clients

@s-ludwig s-ludwig merged commit 2babc54 into vibe-d:master Dec 2, 2015

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details

s-ludwig added a commit that referenced this pull request Dec 2, 2015

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