chat.swift 417 B

12345678910111213141516171819
  1. //
  2. // chat.swift
  3. // Swifter
  4. //
  5. // Created by Damian Kolakowski on 17/10/15.
  6. // Copyright © 2015 Damian Kołakowski. All rights reserved.
  7. //
  8. import Foundation
  9. let server = testSocket(NSBundle.mainBundle().resourcePath!)
  10. do {
  11. try server.start(9080)
  12. print("Server has started ( port = 9080 ). Try to connect now...")
  13. NSRunLoop.mainRunLoop().run()
  14. } catch {
  15. print("Server start error: \(error)")
  16. }