import org.zeromq.ZMQ
import java.lang.{Math, Thread}

object Main {
    def main(args: Array[String]) {
        val ctx = ZMQ.context(2)
        val s = ctx.socket(ZMQ.PUSH)
        s.bind("tcp://*:6001")

        for (i <- 1 to 100) {
            var r1 = (Math.random() * 100).asInstanceOf[Int]
            var r2 = (Math.random() * 100).asInstanceOf[Int]

            s.send("%s+%s".format(r1, r2).getBytes(), 0)
        }
    }
}
