POE-Stage

 view release on metacpan or  search on metacpan

examples/tcp-server.perl  view on Meta::CPAN

				warn "remote closed connection";
			}
			$req_input_watcher = undef;
			return;
		}

		my ($offset, $rest) = (0, $ret);
		while ($rest) {
			my $wrote = syswrite($arg_handle, $buf, $rest, $offset);

			# Nasty busy loop for rapid prototyping.
			unless ($wrote) {
				next if $! == EAGAIN or $! == EWOULDBLOCK;
				warn "write error: $!";
				$req_input_watcher = undef;
				return;
			}

			$rest -= $wrote;
			$offset += $wrote;
		}



( run in 2.426 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )