xmpp/xmpp.go
changeset 129 cccf2b2fe34d
parent 128 8342afcffc92
child 130 da6f37ae3ffe
equal deleted inserted replaced
128:8342afcffc92 129:cccf2b2fe34d
    58 	// way from the remote server to the application; SendFilter
    58 	// way from the remote server to the application; SendFilter
    59 	// intercepts messages going the other direction.
    59 	// intercepts messages going the other direction.
    60 	RecvFilter Filter
    60 	RecvFilter Filter
    61 	SendFilter Filter
    61 	SendFilter Filter
    62 }
    62 }
    63 
       
    64 // Allows the user to override the TLS configuration.
       
    65 var TlsConfig tls.Config
       
    66 
    63 
    67 // The client in a client-server XMPP connection.
    64 // The client in a client-server XMPP connection.
    68 type Client struct {
    65 type Client struct {
    69 	// This client's JID. This will be updated asynchronously by
    66 	// This client's JID. This will be updated asynchronously by
    70 	// the time StartSession() returns.
    67 	// the time StartSession() returns.
    92 	// asynchronously as new features are received throughout the
    89 	// asynchronously as new features are received throughout the
    93 	// connection process. It should not be updated once
    90 	// connection process. It should not be updated once
    94 	// StartSession() returns.
    91 	// StartSession() returns.
    95 	Features                     *Features
    92 	Features                     *Features
    96 	sendFilterAdd, recvFilterAdd chan Filter
    93 	sendFilterAdd, recvFilterAdd chan Filter
       
    94 	// Allows the user to override the TLS configuration.
       
    95 	TlsConfig tls.Config
    97 }
    96 }
    98 
    97 
    99 // Connect to the appropriate server and authenticate as the given JID
    98 // Connect to the appropriate server and authenticate as the given JID
   100 // with the given password. This function will return as soon as a TCP
    99 // with the given password. This function will return as soon as a TCP
   101 // connection has been established, but before XMPP stream negotiation
   100 // connection has been established, but before XMPP stream negotiation