summaryrefslogtreecommitdiff
path: root/src/main/scala/com/tylerstonge/honeypot/http/SimplisticHandler.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/com/tylerstonge/honeypot/http/SimplisticHandler.scala')
-rw-r--r--src/main/scala/com/tylerstonge/honeypot/http/SimplisticHandler.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/scala/com/tylerstonge/honeypot/http/SimplisticHandler.scala b/src/main/scala/com/tylerstonge/honeypot/http/SimplisticHandler.scala
new file mode 100644
index 0000000..2fe1409
--- /dev/null
+++ b/src/main/scala/com/tylerstonge/honeypot/http/SimplisticHandler.scala
@@ -0,0 +1,11 @@
+package com.tylerstonge.honeypot.http
+
+import akka.actor.Actor
+import akka.io.Tcp.{PeerClosed, Received, Write}
+
+class SimplisticHandler extends Actor {
+ def receive: Receive = {
+ case Received(data) => sender() ! Write(data)
+ case PeerClosed => context.stop(self)
+ }
+}