Class ClientNetty<T>
- java.lang.Object
-
- be.yildizgames.module.network.client.Client
-
- be.yildizgames.module.network.netty.client.ClientNetty<T>
-
- All Implemented Interfaces:
be.yildizgames.module.network.client.ClientCallBack,be.yildizgames.module.network.client.MessageSender,be.yildizgames.module.network.client.NetworkClient
- Direct Known Subclasses:
SimpleClientNetty,WebSocketClientNetty
public abstract class ClientNetty<T> extends be.yildizgames.module.network.client.ClientNetty implementation for a client.- Author:
- Grégory Van den Borre
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TbuildMessage(String message)voidclose()voidconnectImpl(String address, int port)protected abstract voidconnectionComplete()voiddisconnect()abstract be.yildizgames.module.network.DecoderEncodergetCodec()voidsendMessage(be.yildizgames.module.network.protocol.NetworkMessage message)voidsendMessage(String message)voidsetTimeOut(int timeout)Set the time out, in milliseconds.-
Methods inherited from class be.yildizgames.module.network.client.Client
addNetworkListener, connect, connectionFailed, connectionLost, connectionSuccessful, delayMessageToNextFrame, getEngine, isConnected, messageReceived, throwError, update
-
-
-
-
Method Detail
-
setTimeOut
public void setTimeOut(int timeout)
Set the time out, in milliseconds.- Parameters:
timeout- Timeout value.
-
connectImpl
public void connectImpl(String address, int port)
- Specified by:
connectImplin classbe.yildizgames.module.network.client.Client
-
connectionComplete
protected abstract void connectionComplete()
-
close
public void close()
- Specified by:
closein classbe.yildizgames.module.network.client.Client
-
sendMessage
public void sendMessage(be.yildizgames.module.network.protocol.NetworkMessage message)
- Specified by:
sendMessagein interfacebe.yildizgames.module.network.client.MessageSender- Specified by:
sendMessagein classbe.yildizgames.module.network.client.Client
-
sendMessage
public void sendMessage(String message)
- Specified by:
sendMessagein classbe.yildizgames.module.network.client.Client
-
disconnect
public void disconnect()
- Specified by:
disconnectin classbe.yildizgames.module.network.client.Client
-
getCodec
public abstract be.yildizgames.module.network.DecoderEncoder getCodec()
-
-