Socket.hostName

string hostName() @property @trusted

Returns

The local machine's host name