1
我在Scala 2.10.1應用程序中使用Netty 4.0.0.CR3。此客戶端代碼在Scala中使用Netty
...
val b: Bootstrap = new Bootstrap
b.group(group).channel(classOf[NioSocketChannel]).handler(new QueryWebClientIntializer)
...
導致編譯錯誤
not found: value classOf
b.group(group).channel(classOf[NioSocketChannel]).handler(new QueryWebClientIntializer)
此服務器端代碼
...
val b: ServerBootstrap = new ServerBootstrap
b.group(bossGroup, workerGroup).channel(classOf[NioServerSocketChannel]).childHandler(new QueryWebServerInitializer(server))
...
完美。
我在做什麼錯?
你試過'Predef.classOf'? – 4lex1v
@Alexlv奇怪的是,它的工作,謝謝你 – Tolsi