Class SocketUserSession
java.lang.Object
com.iohao.net.external.core.netty.session.SocketUserSession
- All Implemented Interfaces:
AttrOptionDynamic, UserSession
Socket UserSession
- Author:
- 渔民小镇
- date:
- 2023-02-18
-
Method Summary
Modifier and TypeMethodDescriptionvoidemploy(CommunicationMessage message) Adds user info to request.booleangetIp()Get player IPinthashCode()booleanisActive()activebooleanChecks if the identity has been verified.voidsetBindingLogicServerIds(int[] bindingLogicServerIds) voidsetUserId(long userId) Sets the ID of the current user (player).io.netty.channel.ChannelFuturewriteAndFlush(Object message) writeAndFlushMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AttrOptionDynamic
getOptions, ifNull, ifPresent, option, option, optionValueMethods inherited from interface UserSession
getBindingLogicServerIds, getState, getUserChannelId, getUserId, ofMessage, setAttachment, setExternalJoin
-
Method Details
-
isActive
public boolean isActive()Description copied from interface:UserSessionactive- Specified by:
isActivein interfaceUserSession- Returns:
- true active
-
writeAndFlush
Description copied from interface:UserSessionwriteAndFlush- Parameters:
message- message- Returns:
- ChannelFuture
-
getIp
-
employ
Description copied from interface:UserSessionAdds user info to request. Developers can extend data via HeadMetadata.setAttachmentData(byte[]), which will be forwarded to the logic server.- Specified by:
employin interfaceUserSession- Parameters:
message- message
-
setUserId
public void setUserId(long userId) Description copied from interface:UserSessionSets the ID of the current user (player).- Specified by:
setUserIdin interfaceUserSession- Parameters:
userId- userId
-
setBindingLogicServerIds
public void setBindingLogicServerIds(int[] bindingLogicServerIds) - Specified by:
setBindingLogicServerIdsin interfaceUserSession
-
isVerifyIdentity
public boolean isVerifyIdentity()Description copied from interface:UserSessionChecks if the identity has been verified.- Specified by:
isVerifyIdentityin interfaceUserSession- Returns:
- true: if logged in
-
equals
-
hashCode
-