//
//  RecentViewController.swift
//  SocketChat
//
//  Created by Justine on 16/5/27.
//  Copyright © 2016年 AppCoda. All rights reserved.
//

import UIKit
var mysocket:TCPClient?
class RecentViewController: UIViewController {
    @IBOutlet weak var lab: UILabel!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.redColor()
        let story = UIStoryboard(name: "Main", bundle: nil)
        let RecentVC = story.instantiateViewControllerWithIdentifier("RecentVC")
        
        TCPClient.shareInstance.connect(GET_APP_SERVER! as! String)
        let params:[String] = ["serverID = \(GET_SERVER_ID as! String)",
                               "loginName = \(GET_USER_NAME as! String)",
                               "password = a12345678",
                               "type = 1 ",
                               "clientType = 1",
                               "deviceToken = \(GET_USER_TOKEN as! String)"]
        mysocket?.send("user.auth", data: params)
        TCPClient.shareInstance.recived("user.auth")
        //self.presentViewController(RecentVC, animated: true, completion: { () -> Void in
        
        //})
        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
