The internal type of the Java wrapped class.
The internal type of the Java wrapped class.
The internal instance of the Java wrapped class.
The internal instance of the Java wrapped class.
Close the NetSocket
Set a handler that will be called when the NetSocket is closed
Set a data handler.
Set a data handler. As data is read, the handler will be called with the data.
Set a drain handler on the stream.
Set a drain handler on the stream. If the write queue is full, then the handler will be called when the write queue has been reduced to maxSize / 2. See org.vertx.scala.core.streams.Pump for an example of this being used.
Set an end handler.
Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.
Set an exception handler.
Set an exception handler.
Returns true
if this org.vertx.scala.core.net.NetSocket is encrypted via SSL/TLS.
Return the local address for this socket
Pause the ReadSupport
.
Pause the ReadSupport
. While it's paused, no data will be sent to the dataHandler
Return the remote address for this socket
Resume reading.
Resume reading. If the ReadSupport
has been paused, reading will recommence on it.
Same as NetSocket.sendFile() but also takes a handler that will be called when the send has completed or a failure has occurred
Tell the kernel to stream a file as specified by filename
directly from disk to the outgoing connection,
bypassing userspace altogether (where supported by the underlying operating system.
Tell the kernel to stream a file as specified by filename
directly from disk to the outgoing connection,
bypassing userspace altogether (where supported by the underlying operating system. This is a very efficient way to stream files.
Set the maximum size of the write queue to maxSize
.
Set the maximum size of the write queue to maxSize
. You will still be able to write to the stream even
if there is more than maxSize
bytes in the write queue. This is used as an indicator by classes such as
Pump
to provide flow control.
Upgrade channel to use SSL/TLS.
Upgrade channel to use SSL/TLS. Be aware that for this to work SSL must be configured.
Helper method wrapping invocations and returning the Scala type, once again to help provide fluent return types
Helper method wrapping invocations and returning the Scala type, once again to help provide fluent return types
Write a java.lang.String to the connection, encoded using the encoding enc
.
Write a java.lang.String to the connection, encoded using the encoding enc
.
A reference to this, so multiple method calls can be chained.
Write a java.lang.String to the connection, encoded in UTF-8.
Write a java.lang.String to the connection, encoded in UTF-8.
A reference to this, so multiple method calls can be chained.
Write some data to the stream.
Write some data to the stream. The data is put on an internal write queue, and the write actually happens asynchronously. To avoid running out of memory by putting too much on the write queue, check the org.vertx.scala.core.streams.WriteStream.writeQueueFull() method before writing. This is done automatically if using a org.vertx.scala.core.streams.Pump.
When a NetSocket
is created it automatically registers an event handler with the event bus, the ID of that
handler is given by writeHandlerID
.
When a NetSocket
is created it automatically registers an event handler with the event bus, the ID of that
handler is given by writeHandlerID
.
Given this ID, a different event loop can send a buffer to that event handler using the event bus and that buffer will be received by this instance in its own event loop and written to the underlying connection. This allows you to write data to other connections which are owned by different event loops.
This will return true
if there are more bytes in the write queue than the value set using
org.vertx.scala.core.streams.WriteStream.setWriteQueueMaxSize()
This will return true
if there are more bytes in the write queue than the value set using
org.vertx.scala.core.streams.WriteStream.setWriteQueueMaxSize()
Represents a socket-like interface to a TCP/SSL connection on either the client or the server side.
Instances of this class are created on the client side by an org.vertx.scala.core.net.NetClient when a connection to a server is made, or on the server side by a org.vertx.scala.core.net.NetServer when a server accepts a connection.
It implements both org.vertx.scala.core.streams.ReadStream and org.vertx.scala.core.streams.WriteStream so it can be used with org.vertx.java.core.streams.Pump to pump data with flow control.
Instances of this class are not thread-safe.