Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(18)

Issue 5058043: code review 5058043: websocket: add mutex to make websocket full-duplex

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 6 months ago by ukai
Modified:
13 years, 5 months ago
Reviewers:
rsc
CC:
golang-dev, rsc
Visibility:
Public.

Description

websocket: add mutex to make websocket full-duplex One benefit of websocket is that it is full-duplex so that it could send and receive at the same time. This CL makes websocket goroutine safe, so user could use websocket both on goroutine for read and on goroutine for write.

Patch Set 1 #

Patch Set 2 : diff -r 49696534f8b7 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 49696534f8b7 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 49696534f8b7 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -0 lines) Patch
M src/pkg/websocket/hixie.go View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/pkg/websocket/hybi.go View 1 2 chunks +4 lines, -0 lines 0 comments Download
M src/pkg/websocket/websocket.go View 1 6 chunks +11 lines, -0 lines 0 comments Download

Messages

Total messages: 5
ukai
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 5 months ago (2011-09-20 08:41:26 UTC) #1
rsc
I'm confused. It looks like the websocket code already allows one goroutine to read at ...
13 years, 5 months ago (2011-09-20 14:47:42 UTC) #2
ukai
On 2011/09/20 14:47:42, rsc wrote: > I'm confused. It looks like the websocket code already ...
13 years, 5 months ago (2011-09-21 00:16:28 UTC) #3
rsc
LGTM
13 years, 5 months ago (2011-09-23 01:39:44 UTC) #4
rsc
13 years, 5 months ago (2011-09-23 01:49:57 UTC) #5
*** Submitted as http://code.google.com/p/go/source/detail?r=671d87eec5df ***

websocket: add mutex to make websocket full-duplex

One benefit of websocket is that it is full-duplex so that it could
send and receive at the same time.
This CL makes websocket goroutine safe, so user could use websocket
both on goroutine for read and on goroutine for write.

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/5058043

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b