summaryrefslogtreecommitdiff
path: root/pkg/server/socket/loop.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/server/socket/loop.go')
-rw-r--r--pkg/server/socket/loop.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkg/server/socket/loop.go b/pkg/server/socket/loop.go
index 88e9491..a06448a 100644
--- a/pkg/server/socket/loop.go
+++ b/pkg/server/socket/loop.go
@@ -7,31 +7,31 @@ import (
type loopSocket struct{}
-type loopChannel struct {
+type loopConn struct {
c chan queue.Q
q chan error
}
-func (c *loopChannel) Send(wq queue.Q) error {
+func (c *loopConn) Send(wq queue.Q) error {
c.c <- wq
return <-c.q
}
-func (c *loopChannel) Recv(rq queue.Q) error {
+func (c *loopConn) Recv(rq queue.Q) error {
defer close(c.q)
return queue.Copy(rq, <-c.c)
}
-func (c *loopChannel) String() string {
+func (c *loopConn) String() string {
return "loop"
}
-func (c *loopChannel) Close() error {
+func (c *loopConn) Close() error {
return nil
}
-func (s *loopSocket) Open(env.Env) (Channel, error) {
- return &loopChannel{make(chan queue.Q), make(chan error)}, nil
+func (s *loopSocket) Open(env.Env) (Conn, error) {
+ return &loopConn{make(chan queue.Q), make(chan error)}, nil
}
func (s *loopSocket) String() string {