TCP_STREAM_SOCKET: added try_ready_for_reading' which is the same as ready_for_reading' but without any timeout
This commit is contained in:
@@ -40,6 +40,19 @@ feature -- Output
|
|||||||
put_managed_pointer (ext.managed_data, 0, s.count)
|
put_managed_pointer (ext.managed_data, 0, s.count)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
feature -- Status report
|
||||||
|
|
||||||
|
try_ready_for_reading: BOOLEAN
|
||||||
|
-- Is data available for reading from the socket right now?
|
||||||
|
require
|
||||||
|
socket_exists: exists
|
||||||
|
local
|
||||||
|
retval: INTEGER
|
||||||
|
do
|
||||||
|
retval := c_select_poll_with_timeout (descriptor, True, 0)
|
||||||
|
Result := (retval > 0)
|
||||||
|
end
|
||||||
|
|
||||||
note
|
note
|
||||||
copyright: "2011-2011, Javier Velilla and others"
|
copyright: "2011-2011, Javier Velilla and others"
|
||||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
|
|||||||
Reference in New Issue
Block a user