Top Description Fields Constructors Methods
org.python.core.io

public Class ServerSocketIO

extends SocketIOBase<ServerSocketChannel>
Class Inheritance
Imports
java.nio.ByteBuffer, java.nio.channels.ServerSocketChannel, jnr.constants.platform.Errno, org.python.core.Py

Raw I/O implementation for server sockets.
Author
Philip Jenvey

Field Summary

Inherited from org.python.core.io.SocketIOBase:
socketChannel

Constructor Summary

AccessConstructor and Description
public
ServerSocketIO(ServerSocketChannel
a ServerSocketChannel to wrap
socketChannel
,
String
a raw io socket mode String
mode
)

Construct a ServerSocketIO for the given ServerSocketChannel.

Method Summary

Modifier and TypeMethod and Description
public int
readinto(ByteBuffer
a ByteBuffer to read bytes into
buf
)

Overrides org.python.core.io.RawIOBase.readinto.

Read up to buf.remaining() bytes into buf.

public int
write(ByteBuffer
a ByteBuffer value
buf
)

Overrides org.python.core.io.RawIOBase.write.

Write the given ByteBuffer to the IO stream.

Inherited from org.python.core.io.SocketIOBase:
closegetChannelparseModereadablewritable

Constructor Detail

ServerSocketIOback to summary
public ServerSocketIO(ServerSocketChannel socketChannel, String mode)

Construct a ServerSocketIO for the given ServerSocketChannel.

Parameters
socketChannel:ServerSocketChannel

a ServerSocketChannel to wrap

mode:String

a raw io socket mode String

Method Detail

readintoback to summary
public int readinto(ByteBuffer buf)

Overrides org.python.core.io.RawIOBase.readinto.

Doc from org.python.core.io.RawIOBase.readinto.

Read up to buf.remaining() bytes into buf. Returns number of bytes read (0 for EOF).

Parameters
buf:ByteBuffer

a ByteBuffer to read bytes into

Returns:int

the amount of data read as an int

Annotations
@Override

writeback to summary
public int write(ByteBuffer buf)

Overrides org.python.core.io.RawIOBase.write.

Doc from org.python.core.io.RawIOBase.write.

Write the given ByteBuffer to the IO stream. Returns the number of bytes written, which may be less than buf.remaining().

Parameters
buf:ByteBuffer

a ByteBuffer value

Returns:int

the number of bytes written as an int

Annotations
@Override