close the stream

Property definitions

core $ Stream :: close
	# close the stream
	fun close is abstract
lib/core/stream.nit:84,2--85,22

core $ FileStream :: close
	redef fun close
	do
		var file = _file
		if file == null then return
		if file.address_is_null then
			if last_error != null then return
			last_error = new IOError("Cannot close unopened file")
			return
		end
		var i = file.io_close
		if i != 0 then
			last_error = new IOError("Close failed due to error {sys.errno.strerror}")
		end
		_file = null
	end
lib/core/file.nit:68,2--82,4

core $ Protocol :: close
	redef fun close do origin.close
lib/core/protocol.nit:21,2--32

core $ BytesWriter :: close
	redef fun close do closed = true
lib/core/stream.nit:668,2--33

core $ BytesReader :: close
	redef fun close do bytes = new Bytes.empty
lib/core/stream.nit:721,2--43

libevent $ Connection :: close
	# Close this connection if possible, otherwise mark it to be closed later
	redef fun close
	do
		if closed then return

		var i = native_buffer_event.input_buffer
		var o = native_buffer_event.output_buffer
		if i.length > 0 or o.length > 0 then
			close_requested = true
		else
			force_close
		end
	end
lib/libevent/libevent.nit:163,2--175,4

core $ FileWriter :: close
	redef fun close
	do
		super
		_is_writable = false
	end
lib/core/file.nit:251,2--255,4

core $ StringReader :: close
	redef fun close
	do
		source = ""
		super
	end
lib/core/stream.nit:765,2--769,4

core $ ProcessReader :: close
	redef fun close do stream_in.close
lib/core/exec.nit:348,2--35

core $ ProcessWriter :: close
	redef fun close do stream_out.close
lib/core/exec.nit:373,2--36

filter_stream $ StreamCat :: close
	redef fun close
	do
		while stream != null do
			stream.close
			stream = null
		end
	end
lib/filter_stream/filter_stream.nit:74,2--80,4

filter_stream $ StreamDemux :: close
	redef fun close
	do
		for i in _streams
		do
			stream = i
			stream.close
		end
	end
lib/filter_stream/filter_stream.nit:122,2--129,4

core $ ProcessDuplex :: close
	redef fun close
	do
		stream_in.close
		stream_out.close
	end
lib/core/exec.nit:396,2--400,4

socket $ TCPStream :: close
	redef fun close
	do
		if closed then return
		if native.close >= 0 then
			closed = true
		end
	end
lib/socket/socket.nit:201,2--207,4

websocket $ WebsocketConnection :: close
	# Disconnect from a client
	redef fun close do
		origin.close
		closed = true
	end
lib/websocket/websocket.nit:100,2--104,4