private bool initializeSocket()
{
if (!setNonBlocking())
return false;
setNoDelay(true);
setKeepAlive(use_keepalive, 60, 10, 9);
if (string.IsNullOrEmpty(cached_remote_host))
{
if (is_server)
cached_remote_host = "TCPServer Socket";
else
cached_remote_host = ClientURI + " on socket " + sock;
}
//Console.WriteLine("cached_remote_host = "+cached_remote_host);
if (poll_set != null)
{
poll_set.addSocket(sock, socketUpdate, this);
}
if (!is_server && !sock.Connected)
{
close();
return false;
}
return true;
}