client and server manage to talk
[scpubgit/Tak.git] / lib / Tak / Request.pm
diff --git a/lib/Tak/Request.pm b/lib/Tak/Request.pm
new file mode 100644 (file)
index 0000000..669e027
--- /dev/null
@@ -0,0 +1,14 @@
+package Tak::Request;
+
+use Moo;
+
+has tag => (is => 'ro', required => 1);
+
+has respond_to => (is => 'ro', required => 1, weak_ref => 1);
+
+sub respond {
+  my $self = shift;
+  $self->respond_to->send_response($self->tag => @_);
+}
+
+1;