Using SCSocket in Swift

So this is my first time working with socket and I have app that already use SCSocket and I want to send message using that socket I was able to use the emitEvent(topic ?? "", withData: Data) to login and subscribe to the topic , but now the issue how can I send and receive the coming and going messages

this what I am trying to do

SCSocket.client()?.emitEvent("login, withData: data)

one I am login and sub I am trying to send new message using the topic

SCSocket.client()?.emitEvent(topic ?? "", withData: data)

but socketClusterReceivedEvent does not get call so I can received and see the response or to know if my request was successful

     func socketClusterReceivedEvent(_ eventName: String, withData data: [AnyHashable : Any]?, isStandartEvent: Bool) {
if eventName == "#publish" {
print ("messages send ")