| 1234567891011121314151617181920212223242526272829303132 |
- //
- // TCPClient.swift
- // SocketChat
- //
- // Created by Justine on 16/5/27.
- // Copyright © 2016年 AppCoda. All rights reserved.
- //
- import Foundation
- import CocoaAsyncSocket
- import SocketIOClientSwift
- protocol SocketIODelegate {
- // didsend()
- // didrecived()
- }
- class TCPClient{
- static let shareInstance = TCPClient()
- var counter = 0
- var socket:SocketIOClient?
- func connect(urlstr:String){
- socket = SocketIOClient.init(socketURL: NSURL(string: urlstr)!)
- //socket = SocketIOClient.ini
- print(socket?.status)
- }
- func disconnect(){}
- func reconnect(){}
- func send(){}
- func recived(){}
-
- }
|