@JRubyMethod
public IRubyObject socket(ThreadContext context) {
SelectableChannel socket = postgresqlConnection.getSocket();
RubyIO rubyIO = RubyIO.newIO(context.runtime, socket);
return rubyIO.fileno(context);
}
@JRubyMethod
public IRubyObject backend_pid(ThreadContext context) {
return context.runtime.newFixnum(postgresqlConnection.getBackendPid());