- MAX_HANDSHAKE_ATTEMPS = 10, -- attemps to finish ssl handshake
- HANDSHAKE_TIMEOUT = 1, -- timout in seconds per handshake attemp
+ MAX_HANDSHAKE_ATTEMPS = 1000, -- attemps to finish ssl handshake
+ HANDSHAKE_TIMEOUT = 30, -- timout in seconds per handshake attemp
MAX_READ_LENGTH = 1024 * 1024 * 1024 * 1024, -- max bytes allowed to read from sockets
MAX_SEND_LENGTH = 1024 * 1024 * 1024 * 1024, -- max bytes size of write buffer (for writing on sockets)
ACCEPT_DELAY = 10, -- seconds to wait until the next attemp of a full server to accept
READ_TIMEOUT = 60 * 30, -- timeout in seconds for read data from socket
WRITE_TIMEOUT = 30, -- timeout in seconds for write data on socket
MAX_READ_LENGTH = 1024 * 1024 * 1024 * 1024, -- max bytes allowed to read from sockets
MAX_SEND_LENGTH = 1024 * 1024 * 1024 * 1024, -- max bytes size of write buffer (for writing on sockets)
ACCEPT_DELAY = 10, -- seconds to wait until the next attemp of a full server to accept
READ_TIMEOUT = 60 * 30, -- timeout in seconds for read data from socket
WRITE_TIMEOUT = 30, -- timeout in seconds for write data on socket
CLEAR_DELAY = 5, -- seconds to wait for clearing interface list (and calling ondisconnect listeners)
DEBUG = true, -- show debug messages
}
CLEAR_DELAY = 5, -- seconds to wait for clearing interface list (and calling ondisconnect listeners)
DEBUG = true, -- show debug messages
}
self:_lock( false, false, false )
--vdebug( "start listening on client socket with id:", self.id )
self.eventread = addevent( base, self.conn, EV_READ, self.readcallback, cfg.READ_TIMEOUT ) -- register callback
self:_lock( false, false, false )
--vdebug( "start listening on client socket with id:", self.id )
self.eventread = addevent( base, self.conn, EV_READ, self.readcallback, cfg.READ_TIMEOUT ) -- register callback
attempt = attempt + 1
debug( "ssl handshake of client with id:"..tostring(self).."attemp:"..attempt )
if attempt > maxattempt then
attempt = attempt + 1
debug( "ssl handshake of client with id:"..tostring(self).."attemp:"..attempt )
if attempt > maxattempt then
_ = self.eventsession and self.eventsession:close( )
_ = self.eventwritetimeout and self.eventwritetimeout:close( )
_ = self.eventreadtimeout and self.eventreadtimeout:close( )
_ = self.eventsession and self.eventsession:close( )
_ = self.eventwritetimeout and self.eventwritetimeout:close( )
_ = self.eventreadtimeout and self.eventreadtimeout:close( )
_ = self.conn and self.conn:close( ) -- close connection, must also be called outside of any socket registered events!
_ = self._server and self._server:counter(-1);
self.eventread, self.eventwrite = nil, nil
_ = self.conn and self.conn:close( ) -- close connection, must also be called outside of any socket registered events!
_ = self._server and self._server:counter(-1);
self.eventread, self.eventwrite = nil, nil
self.nointerface, self.noreading, self.nowriting = nointerface, noreading, nowriting
return nointerface, noreading, nowriting
end
self.nointerface, self.noreading, self.nowriting = nointerface, noreading, nowriting
return nointerface, noreading, nowriting
end
clientinterface:_start_session( clientinterface.onconnect )
end
debug( "accepted incoming client connection from:", ip, port )
clientinterface:_start_session( clientinterface.onconnect )
end
debug( "accepted incoming client connection from:", ip, port )
debug "fatal error: luasec not found"
return nil, "luasec not found"
end
debug "fatal error: luasec not found"
return nil, "luasec not found"
end
debug "need luasec, but not available"
return nil, "luasec not found"
end
debug "need luasec, but not available"
return nil, "luasec not found"
end