class Kafka::SocketWithTimeout
def write(bytes)
-
(Integer)
- the number of bytes written.
Raises:
-
(Errno::ETIMEDOUT)
- if the timeout is exceeded.
Parameters:
-
bytes
(String
) -- the data that should be written to the socket.
def write(bytes) unless IO.select(nil, [@socket], nil, @timeout) raise Errno::ETIMEDOUT end @socket.write(bytes) end