 import Starscream
 import ObjectMapper
 
-/// This class abstracts the network handling of sending messages through a websocket
-public class WatsonSocket {
-    
+
+/// Watson Web Socket abstraction
+internal class WatsonSocket {
+    
+    private let tokenURL = "https://stream.watsonplatform.net/authorization/api/v1/token"
+    private let serviceURL = "/speech-to-text/api"
+    private let serviceURLFull = "https://stream.watsonplatform.net/speech-to-text/api"
     private let url = "wss://stream.watsonplatform.net/speech-to-text/api/v1/recognize"
     
     var audioUploadQueue: NSOperationQueue!
     
+    // The format for continuous PCM based recognition requires OGG
     var format: SpeechToTextAudioFormat = .OGG
     
+    // Starscream websocket
     var socket: WebSocket?
 
-    public var token: String?
+    // The Basic authentication Base64 request
+    internal var apiKey: String?
+    
+    internal var username: String?
+    internal var password: String?
+    
+    /** If set, will use the username and password specified to generate Watson Token
+      Normally, a token should be provided.
+    */
+    internal var generateToken: Bool = true
+    
+    // The received token from Watson
+    internal var token: String?
     
     init() {
     

     - parameter socket: <#socket description#>
     - parameter data:   <#data description#>
     */
    public func websocketDidReceiveData(socket: WebSocket, data: NSData) {
        // print("socket received data")
        Log.sharedLogger.warning("Websocket received binary data")
    }

        // add to transcription queue
    }
}


