Max Howell
Max Howell
Actually SwiftPM does enforce this.
I believe I originally considered this “out of scope” but let’s face it, there needs to be an easy way to do this. Not sure about how it should work...
Lovely. Approved.
I rewrote most of this code in the ping branch that I finally merged today. And I think as a side effect I fixed this. There may be additional issues...
Current master has: ``` objc - (void)webSocketServer:(MBWebSocketServer *)webSocket didReceiveData:(NSData *)data fromConnection:(GCDAsyncSocket *)connection; ``` You can then send data to that GCDAsyncSocket provided it is formatted correctly first. I provide the...
Happy to implement this. I didn't bother as for my uses (communication with a browser's Javascript WebSocket) it didn't seem necessary.
Code would go in `- (void)socket:(GCDAsyncSocket *)connection didReadData:(NSData *)data withTag:(long)tag`. I agree documentation is lacking. I didn't add much as I knew I'd refactor it four times or so. That...
I have this code almost ready to go. If I understand your request, you also want to actively ping individual clients? As well as have MBWebSocketServer respond to pings they...
https://github.com/mxcl/MBWebSocketServer/tree/ping I'm currently trying to test the pings, but it seems to still work with my app so I'm assuming I didn't break it.
Seems that pings work. Please test and confirm and then I'll merge.