Skip to content

Instantly share code, notes, and snippets.

@Krishna21Soni13
Created January 3, 2020 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Krishna21Soni13/f157b655f7fb393df81da05e77dcb649 to your computer and use it in GitHub Desktop.
Save Krishna21Soni13/f157b655f7fb393df81da05e77dcb649 to your computer and use it in GitHub Desktop.
To send the message.
func sendMessage(message: String, withNickname nickname: String) {
guard let socket = manager?.defaultSocket else {
return
}
socket.emit("chatMessage", nickname, message)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment