public static void initialize( Session session ) throws SocketException
{
SessionConfig config = session.getConfig();
if( config instanceof SocketSessionConfig )
{
SocketSessionConfig ssc = ( SocketSessionConfig ) config;
ssc.setReuseAddress( true );
ssc.setKeepAlive( true );
}
else if( config instanceof DatagramSessionConfig )
{
DatagramSessionConfig dsc = ( DatagramSessionConfig ) config;
dsc.setReuseAddress( true );