What does dot before method name mean?
Adam D. Ruppe
destructionator at gmail.com
Sat May 8 01:48:22 UTC 2021
On Saturday, 8 May 2021 at 01:45:49 UTC, Stephen Miller wrote:
> I am writing a tcp proxy server and I noticed that when a
> socket is in non-blocking mode, it returns -1 if it doesn't
> receive data, as opposed to 0.
It sets the `wouldHaveBlocked` flag in that case returning -1. 0
always means connection closed.
> My questions are: What does the dot in front of recv mean?
> Where is that code?
Leading dot means to look it up from top level instead of the
local/class member. So then it uses the system function - recv
from C - instead of the local ones.
More information about the Digitalmars-d-learn
mailing list