From 9512c8b9ac4a30e4b8fae3121d57ad456ebd5e65 Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 25 Mar 2015 12:02:45 -0400 Subject: [PATCH] change api --- README.md | 2 +- SwiftIO/SocketIOClient.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 70fe248..35ef5ac 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Methods 6. `socket.emitWithAckObjc(event:String, withItems items:[AnyObject]) -> SocketAckHandler` - `emitWithAck` for Objective-C. 7. `socket.connect()` - Establishes a connection to the server. A "connect" event is fired upon successful connection. 8. `socket.connectWithParams(params:[String: AnyObject])` - Establishes a connection to the server passing the specified params. A "connect" event is fired upon successful connection. -9. `socket.close(fast:Bool)` - Closes the socket. Once a socket is closed it should not be reopened. Pass true to fast if you're closing from a background task. +9. `socket.close(#fast:Bool)` - Closes the socket. Once a socket is closed it should not be reopened. Pass true to fast if you're closing from a background task. Events ------ diff --git a/SwiftIO/SocketIOClient.swift b/SwiftIO/SocketIOClient.swift index 70edf9c..d0f74f6 100644 --- a/SwiftIO/SocketIOClient.swift +++ b/SwiftIO/SocketIOClient.swift @@ -133,7 +133,7 @@ public class SocketIOClient: NSObject, SocketEngineClient { Will turn off automatic reconnects. Pass true to fast if you're closing from a background task */ - public func close(fast:Bool = false) { + public func close(#fast:Bool) { self.reconnects = false self._connecting = false self._connected = false