Class WebSocket

Represents a single WebSocket connection.

Inherits from

Constructors

Name Description
this

Properties

Name Type Description
connected bool Determines if the WebSocket connection is still alive.
dataAvailableForRead bool Checks if data is readily available for read.

Methods

Name Description
close Actively closes the connection.
receive Receives a new message using an InputStream.
receiveBinary Receives a new message and returns its contents as a newly allocated data array.
receiveText Receives a new message and returns its contents as a newly allocated data array.
send Sends a text message.
send Sends a binary message.
send Sends a message using an output stream.

Aliases

Name Description
receive Compatibility alias for readBinary. Will be deprecated at some point.

Authors

Jan Krüger

Copyright

© 2012 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.