+net = require('net')
+fs = require('fs')
+node_protobuf = require('node-protobuf')
+events = require('events')
+
 # rethinkdb is both the main export object for the module
 # and a function that shortcuts `r.expr`.
 rethinkdb = (args...) -> rethinkdb.expr(args...)

        if @rawSocket?
            @close()

        net = require('net')
        @rawSocket = net.connect @port, @host
        @rawSocket.setNoDelay()


# Protobuf

# Initialize message serializer with
desc = fs.readFileSync(__dirname + "/ql2.desc")
NodePB = new node_protobuf.Protobuf(desc)

# Errors

