~samwhited/xmpp

1430051a0015232476f155b5f32082a8c8b694d5 — Sam Whited 5 years ago 5ef8ed9
Remove Read/Write methods from Session
1 files changed, 2 insertions(+), 4 deletions(-)

M session.go
M session.go => session.go +2 -4
@@ 132,8 132,7 @@ func (s *Session) Config() *Config {
	return s.config
}

// Read reads data from the connection.
func (s *Session) Read(b []byte) (n int, err error) {
func (s *Session) read(b []byte) (n int, err error) {
	s.in.Lock()
	defer s.in.Unlock()



@@ 144,8 143,7 @@ func (s *Session) Read(b []byte) (n int, err error) {
	return s.rwc.Read(b)
}

// Write writes data to the connection.
func (s *Session) Write(b []byte) (n int, err error) {
func (s *Session) write(b []byte) (n int, err error) {
	s.out.Lock()
	defer s.out.Unlock()