user1464329
user1464329

Reputation: 3

Playframework 2.0 scala Akka Websocket error

Got this error while experimenting with the playframework version 2.0.4 with scala:

value foreach is not a member of object akka.actor.IO.Iteratee

package controllers

import play.api.mvc._
import play.api.libs.iteratee.Enumerator
import akka.actor.IO.Iteratee
import play.api.libs.concurrent.Akka


object Application extends Controller {

 def index = WebSocket.async[String] {
    Akka.future{
      val out = Enumerator.imperative[String]()
      val in = Iteratee.foreach[String] {
        msg =>
          out.push(msg)
      }

      (in,out)
    }

  }


}

Any idea what I might be doing wrong.

Thanks.

Upvotes: 0

Views: 364

Answers (1)

sndyuk
sndyuk

Reputation: 2770

import akka.actor.IO.Iteratee

import play.api.libs.iteratee._

Upvotes: 1

Related Questions