| 注释类型 | 说明 |
|---|---|
| EnableTioWebsocketConfiguration |
Enable Tio-Websocket for spring boot application
|
| TioController |
Enable Tio-Websocket for spring boot application
|
| TIOnAfterHandshake |
example:
import org.tio.http.common.HttpRequest;
import org.tio.http.common.HttpResponse;
import org.tio.core.ChannelContext;
\@TIOnAfterHandshake
public void onAfterHandshake(HttpRequest httpRequest, HttpResponse httpResponse, ChannelContext channelContext) {}
|
| TIOnBeforeBytes |
example:
import org.tio.core.ChannelContext;
\@TIOnBeforeBytes
public TioWebsocketRequest onBeforeBytes(ChannelContext channelContext, byte[] bytes) {
return TioWebsocketRequest.builder().event("ping").object("any").build
}
|
| TIOnBeforeText |
example:
import org.tio.core.ChannelContext;
\@TIOnBeforeText
public TioWebsocketRequest onBeforeText(ChannelContext channelContext, String text) {
return TioWebsocketRequest.builder().event("ping").object("any").build
}
|
| TIOnBytes |
example:
import org.tio.core.ChannelContext;
\@TIOnBytes
public void onBytes(ChannelContext channelContext, byte[] bytes) {}
|
| TIOnClose |
example:
import org.tio.core.ChannelContext;
\@TIOnClose
public void onClose(ChannelContext channelContext) {}
|
| TIOnHandshake |
example:
import org.tio.http.common.HttpRequest;
import org.tio.http.common.HttpResponse;
import org.tio.core.ChannelContext;
\@TIOnHandshake
public void handshake(HttpRequest httpRequest, HttpResponse httpResponse, ChannelContext channelContext) {}
|
| TIOnMap |
example:
import org.tio.core.ChannelContext;
\@TIOnMap
public void onMapDefault(ChannelContext channelContext, String event, AnyObject object) {}
\@TIOnMap("ping")
public void onMap(ChannelContext channelContext, AnyObject object) {}
|
| TIOnText |
example:
import org.tio.core.ChannelContext;
\@TIOnText
public void onText(ChannelContext channelContext, String text) {}
|
Copyright © 2018. All rights reserved.