protected void initSocket(ChannelFD fd) { // continue with normal initialization MakeOpenFile(); openFile.setFD(fd); openFile.setMode(OpenFile.READWRITE | OpenFile.SYNC); // see rsock_init_sock in MRI; sockets are initialized to binary setAscii8bitBinmode(); }
protected void initSocket(ChannelFD fd) { // continue with normal initialization MakeOpenFile(); openFile.setFD(fd); openFile.setMode(OpenFile.READWRITE | OpenFile.SYNC); // see rsock_init_sock in MRI; sockets are initialized to binary setAscii8bitBinmode(); }
protected void initSocket(Ruby runtime, ChannelDescriptor descriptor) { // continue with normal initialization MakeOpenFile(); try { openFile.setMainStream(ChannelStream.fdopen(runtime, descriptor, newModeFlags(runtime, ModeFlags.RDONLY))); openFile.setPipeStream(ChannelStream.fdopen(runtime, descriptor, newModeFlags(runtime, ModeFlags.WRONLY))); openFile.getPipeStream().setSync(true); } catch (org.jruby.util.io.InvalidValueException ex) { throw runtime.newErrnoEINVALError(); } openFile.setMode(OpenFile.READWRITE | OpenFile.SYNC); // see rsock_init_sock in MRI; sockets are initialized to binary setAscii8bitBinmode(); }
protected void initSocket(Ruby runtime, ChannelDescriptor descriptor) { // continue with normal initialization MakeOpenFile(); try { openFile.setMainStream(ChannelStream.fdopen(runtime, descriptor, newModeFlags(runtime, ModeFlags.RDONLY))); openFile.setPipeStream(ChannelStream.fdopen(runtime, descriptor, newModeFlags(runtime, ModeFlags.WRONLY))); openFile.getPipeStream().setSync(true); } catch (org.jruby.util.io.InvalidValueException ex) { throw runtime.newErrnoEINVALError(); } openFile.setMode(OpenFile.READWRITE | OpenFile.SYNC); // see rsock_init_sock in MRI; sockets are initialized to binary setAscii8bitBinmode(); }