vapor-community / sockets

🔌 Non-blocking TCP socket layer, with event-driven server and client.
MIT License
575 stars 54 forks source link

How to have callback func when socket have new message? #148

Closed qiyazong closed 6 years ago

qiyazong commented 6 years ago

How to have callback func when socket have new message? I found this func for a long time,if you konw where it is ,please tell me,thank you!!!

Joannis commented 6 years ago

You can use a DispatchSourceRead for that.

qiyazong commented 6 years ago

ok thank you ,I'll try it now!