Skip to content

Commit

Permalink
add read/write closer
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Phillips committed Apr 13, 2017
1 parent 1eaf802 commit 8897e95
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions poller/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ func (conn *EleConnection) GetGUID() string {
}

// GetFarendWriter gets a writer directed towards the endpoint server
func (conn *EleConnection) GetFarendWriter() io.Writer {
func (conn *EleConnection) GetFarendWriter() io.WriteCloser {
return conn.conn
}

// GetFarendReader gets a reader to consume from the endpoint server
func (conn *EleConnection) GetFarendReader() io.Reader {
func (conn *EleConnection) GetFarendReader() io.ReadCloser {
return conn.conn
}

Expand Down
4 changes: 2 additions & 2 deletions poller/poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ type Connection interface {
Close()
// Done returns a channel that is closed when the connection is finished or closed.
Done() <-chan struct{}
GetFarendWriter() io.Writer
GetFarendReader() io.Reader
GetFarendWriter() io.WriteCloser
GetFarendReader() io.ReadCloser
GetGUID() string

// SetAuthenticated should be invoked when a handshake response is successfully received
Expand Down
8 changes: 4 additions & 4 deletions poller/poller_mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,19 +179,19 @@ func (_mr *_MockConnectionRecorder) GetClockOffset() *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "GetClockOffset")
}

func (_m *MockConnection) GetFarendReader() io.Reader {
func (_m *MockConnection) GetFarendReader() io.ReadCloser {
ret := _m.ctrl.Call(_m, "GetFarendReader")
ret0, _ := ret[0].(io.Reader)
ret0, _ := ret[0].(io.ReadCloser)
return ret0
}

func (_mr *_MockConnectionRecorder) GetFarendReader() *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "GetFarendReader")
}

func (_m *MockConnection) GetFarendWriter() io.Writer {
func (_m *MockConnection) GetFarendWriter() io.WriteCloser {
ret := _m.ctrl.Call(_m, "GetFarendWriter")
ret0, _ := ret[0].(io.Writer)
ret0, _ := ret[0].(io.WriteCloser)
return ret0
}

Expand Down

0 comments on commit 8897e95

Please sign in to comment.