public class MessageSocket extends C4Socket implements ReplicatorConnection
NO_FRAMING, WEB_SOCKET_CLIENT_FRAMING, WEB_SOCKET_SERVER_FRAMING, WS_STATUS_CLOSE_ABNORMAL, WS_STATUS_CLOSE_BAD_MESSAGE_FORMAT, WS_STATUS_CLOSE_CANT_FULFILL, WS_STATUS_CLOSE_DATA_ERROR, WS_STATUS_CLOSE_MESSAGE_TO_BIG, WS_STATUS_CLOSE_MISSING_EXTENSION, WS_STATUS_CLOSE_NO_CODE, WS_STATUS_CLOSE_NORMAL, WS_STATUS_CLOSE_POLICY_ERROR, WS_STATUS_CLOSE_PROTOCOL_ERROR, WS_STATUS_CLOSE_TLS_FAILURE, WS_STATUS_CLOSE_USER, WS_STATUS_CLOSE_USER_PERMANENT, WS_STATUS_CLOSE_USER_TRANSIENT, WS_STATUS_GOING_AWAY
Constructor and Description |
---|
MessageSocket(long handle,
MessageEndpoint endpoint) |
MessageSocket(MessageEndpointConnection connection,
ProtocolType protocolType) |
Modifier and Type | Method and Description |
---|---|
void |
close(MessagingError error)
Tells the replicator to close the current replicator connection.
|
void |
receive(Message message)
Tells the replicator to consume the data received from the other peer.
|
String |
toString() |
accumulateAndGet, addAndGet, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, incrementAndGet, intValue, lazySet, longValue, set, updateAndGet, weakCompareAndSet
byteValue, shortValue
public MessageSocket(long handle, MessageEndpoint endpoint)
public MessageSocket(MessageEndpointConnection connection, ProtocolType protocolType)
@NonNull public String toString()
toString
in class AtomicLong
public void close(MessagingError error)
ReplicatorConnection
close
in interface ReplicatorConnection
error
- the error if anypublic void receive(@NonNull Message message)
ReplicatorConnection
receive
in interface ReplicatorConnection
message
- the message