~samwhited/xmpp

5ef8ed9310f6a5cda55350eb25d7478534276c14 — Sam Whited 5 years ago 900bf34
s/Raw/Conn/
5 files changed, 6 insertions(+), 6 deletions(-)

M bind.go
M compress/compression.go
M features.go
M sasl.go
M session.go
M bind.go => bind.go +1 -1
@@ 50,7 50,7 @@ func BindResource() StreamFeature {
				panic("xmpp: bind not yet implemented")
			}

			conn := session.Raw()
			conn := session.Conn()

			reqID := internal.RandomID(internal.IDLen)
			if resource := session.config.Origin.Resourcepart(); resource == "" {

M compress/compression.go => compress/compression.go +1 -1
@@ 84,7 84,7 @@ func New(methods ...Method) xmpp.StreamFeature {
			return true, listed.Methods, nil
		},
		Negotiate: func(ctx context.Context, session *xmpp.Session, data interface{}) (mask xmpp.SessionState, rwc io.ReadWriteCloser, err error) {
			conn := session.Raw()
			conn := session.Conn()

			// If we're a server.
			if (session.State() & xmpp.Received) == xmpp.Received {

M features.go => features.go +1 -1
@@ 54,7 54,7 @@ type StreamFeature struct {
	// this feature creates a security layer (such as TLS) and performs
	// authentication, mask would be set to Authn|Secure, but if it does not
	// authenticate the connection it would just return Secure. If negotiate
	// returns a new io.ReadWriteCloser (probably wrapping the old conn.Raw()) the
	// returns a new io.ReadWriteCloser (probably wrapping the old conn.Conn()) the
	// stream will be restarted automatically after Negotiate returns using the
	// new RWC. If this is an initiated connection and the features List call
	// returned a value, that value is passed to the data parameter when Negotiate

M sasl.go => sasl.go +1 -1
@@ 72,7 72,7 @@ func SASL(mechanisms ...sasl.Mechanism) StreamFeature {
				panic("SASL server not yet implemented")
			}

			conn := session.Raw()
			conn := session.Conn()

			var selected sasl.Mechanism
			// Select a mechanism, prefering the client order.

M session.go => session.go +2 -2
@@ 112,8 112,8 @@ func NewSession(ctx context.Context, config *Config, rwc io.ReadWriteCloser) (*S
	return s, s.negotiateStreams(ctx, rwc)
}

// Raw returns the Session's backing net.Conn or other ReadWriteCloser.
func (s *Session) Raw() io.ReadWriteCloser {
// Conn returns the Session's backing net.Conn or other ReadWriteCloser.
func (s *Session) Conn() io.ReadWriteCloser {
	return s.rwc
}