So I'm using the chat example, and I'm getting a stack overflow when the client disconnects.
I have a hunch of what's going wrong, but I can't figure out how to get information about each client.
They're stored as AsyncSocket in an.. array? @[] but I can't figure out how to use that data to get for example IP.
Next up, I need to figure out a way to clean up disconnecting clients, but that's a separate issue.
So you're saying I should replace
var server = newAsyncSocket()
server.bindAddr(Port(12345))
server.listen()
With the acceptAddr stuff?
I'll answer my own question, in case someone else runs into this.
The answer was to replace server.accept with server.acceptAddr, which lets you access address and client as per docs.