func NewRoom(job *Job, id string, c *conf.Room) (r *Room) {
	r = &Room{
		c:     c,
		id:    id,
		job:   job,
		proto: make(chan *protocol.Proto, c.Batch*2),
	}
	go r.pushproc(c.Batch, time.Duration(c.Signal))
	return
}
NewRoom new a room struct, store channel room info.
package job
import (
	"errors"
	"time"
	"github.com/Terry-Mao/goim/api/protocol"
	"github.com/Terry-Mao/goim/internal/job/conf"
	"github.com/Terry-Mao/goim/pkg/bytes"
	log "github.com/golang/glog"
)
var (
	ErrComet = errors.New("comet rpc is not available")
	ErrCometFull = errors.New("comet proto chan full")
	ErrRoomFull = errors.New("room proto chan full")
	roomReadyProto = new(protocol.Proto)
)
type Room struct {
	c     *conf.Room
	job   *Job
	id    string
	proto chan *protocol.Proto
}