aboutsummaryrefslogtreecommitdiff
path: root/nexgb/cookie.go
diff options
context:
space:
mode:
authorAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-07 01:00:45 -0400
committerAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-07 01:00:45 -0400
commitfd30f1512a713ae5b3cbacddfe9f29dfccc82047 (patch)
tree5801b9fe74106d9780efa23cd1b2c238ba5ffad9 /nexgb/cookie.go
parent6d545e723a7e972998a0e77adcf2219a31a9b800 (diff)
downloadhaven-fd30f1512a713ae5b3cbacddfe9f29dfccc82047.tar.gz
haven-fd30f1512a713ae5b3cbacddfe9f29dfccc82047.tar.xz
haven-fd30f1512a713ae5b3cbacddfe9f29dfccc82047.zip
added tests
Diffstat (limited to 'nexgb/cookie.go')
-rw-r--r--nexgb/cookie.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/nexgb/cookie.go b/nexgb/cookie.go
index 7f54a22..8c0774d 100644
--- a/nexgb/cookie.go
+++ b/nexgb/cookie.go
@@ -9,11 +9,11 @@ import (
// 'cookie' is most frequently used by embedding it into a more specific
// kind of cookie, i.e., 'GetInputFocusCookie'.
type cookie struct {
- conn *Conn
- Sequence uint16
+ conn *Conn
+ Sequence uint16
replyChan chan []byte
errorChan chan error
- pingChan chan bool
+ pingChan chan bool
}
// newCookie creates a new cookie with the correct channels initialized
@@ -24,11 +24,11 @@ type cookie struct {
// corresponding to this cookie is sent over the wire.
func (c *Conn) newCookie(checked, reply bool) *cookie {
cookie := &cookie{
- conn: c,
- Sequence: 0, // we add the sequence id just before sending a request
+ conn: c,
+ Sequence: 0, // we add the sequence id just before sending a request
replyChan: nil,
errorChan: nil,
- pingChan: nil,
+ pingChan: nil,
}
// There are four different kinds of cookies:
@@ -151,4 +151,3 @@ func (c cookie) check() error {
}
panic("unreachable")
}
-