def setctxopt name, value
      length = 4
      pointer = LibC.malloc length
      pointer.write_int value

      rc = LibXS.xs_setctxopt @context, name, pointer, length
      LibC.free(pointer) unless pointer.nil? || pointer.null?
      rc
    end
def setctxopt name, value
      length = 4
      pointer = LibC.malloc length
      pointer.write_int value

      rc = LibXS.xs_setctxopt @context, name, pointer, length
      LibC.free(pointer) unless pointer.nil? || pointer.null?
      rc
    end
Initialize context object
 Sets options on a context.

 It is recommended to use the default for +io_threads+
 (which is 1) since most programs will not saturate I/O.

 The rule of thumb is to make io_threads equal to the number
 of gigabits per second that the application will produce.

 The io_threads number specifies the size of the thread pool
 allocated by Crossroads for processing incoming/outgoing messages.

 The +max_sockets+ number specifies the number of concurrent
 sockets that can be used in the context. The default is 512.

 Context options take effect only if set with **setctxopt()** prior to
 creating the first socket in a given context with **socket()**.

 @param [Constant] name
   One of @XS::IO_THREADS@ or @XS::MAX_SOCKETS@.
 @param [Integer] value

 @return 0 when the operation completed successfully.
 @return -1 when this operation fails.

 @example Set io_threads context option
   rc = context.setctxopt(XS::IO_THREADS, 10)
   unless XS::Util.resultcode_ok?(rc)
     XS::raise_error('xs_setctxopt', rc)
   end