I identify the client by the client ip and port and call the messagesent
function:
private static SocketAddress SwitchId ;
private static final String HOSTNAME = "localhost";
private static final int PORT = 9176; // this port that I used in Mina
socket.
@Override
public void messageSent(final IoSession session, Object message)
throws Exception
{
final InetSocketAddress d = new InetSocketAddress(HOSTNAME, PORT );
session.write(SwitchId ,d);
}
but it doesn’t write to client any thing..!
if I do the message sent like this:
@Override
public void messageSent(final IoSession session, Object message)
throws Exception
{
session.write(SwitchId);
}
also, it doesn’t write to client any thing..! I mean the messageSent
function doesn’t fired. in contrast to sessionOpend function.