SocketIO 16.0.0 Docs (100% documented)
SocketIO Reference
SocketRawView Class Reference
publicfinalclassSocketRawView:NSObjectClass that gives a backwards compatible way to cause an emit not to recursively check for Data objects.
Usage:
socket.rawEmitView.emit("myEvent",myObject)Send an event to the server, with optional data items.
If an error occurs trying to transformitems into their socket representation, aSocketClientEvent.errorwill be emitted. The structure of the error data is[eventName, items, theError]
Swift
publicfuncemit(_event:String,_items:SocketData...)event | The event to send. |
items | The items to send with this event. May be left out. |
Same as emit, but meant for Objective-C
Swift
@objcpublicfuncemit(_event:String,withitems:[Any])event | The event to send. |
items | The items to send with this event. Send an empty array to send no data. |
Sends a message to the server, requesting an ack.
NOTE: It is up to the server send an ack back, just calling this method does not mean the server will ack.Check that your server’s api will ack the event being sent.
If an error occurs trying to transformitems into their socket representation, aSocketClientEvent.errorwill be emitted. The structure of the error data is[eventName, items, theError]
Example:
socket.emitWithAck("myEvent",1).timingOut(after:1){datain...}Swift
publicfuncemitWithAck(_event:String,_items:SocketData...)->OnAckCallbackevent | The event to send. |
items | The items to send with this event. May be left out. |
AnOnAckCallback. You must call thetimingOut(after:) method before the event will be sent.
Same as emitWithAck, but for Objective-C
NOTE: It is up to the server send an ack back, just calling this method does not mean the server will ack.Check that your server’s api will ack the event being sent.
Example:
socket.emitWithAck("myEvent",with:[1]).timingOut(after:1){datain...}Swift
@objcpublicfuncemitWithAck(_event:String,withitems:[Any])->OnAckCallbackevent | The event to send. |
items | The items to send with this event. Use |
AnOnAckCallback. You must call thetimingOut(after:) method before the event will be sent.
© 2021Erik. All rights reserved. (Last updated: 2021-02-01)
Generated byjazzy ♪♫ v0.13.6, aRealm project.