On Jul 22, 2006, at 11:22 PM, Joao wrote:
does anyone has a quick sample on how to use datagramConnector in a
client
program?
not yet.. but what detail are you interested in?
How to send datagrams once I do not really have to connect.
I've got this from one of the samples. The handler sends the message
in the sample below.
// Set connect timeout.
IoConnector connector = new SocketConnector();
( ( IoConnectorConfig ) connector.getDefaultConfig()
).setConnectTimeout( CONNECT_TIMEOUT );
IoSession session;
for( ;; )
{
try
{
ConnectFuture future = connector.connect(
new InetSocketAddress( HOSTNAME, PORT ),
new ClientSessionHandler( USE_CUSTOM_CODEC,
values ) );
future.join();
session = future.getSession();
break;
}
I am kinda messed up on where to write the code to send the udp
datagram packet.
Joao,
-pete
[EMAIL PROTECTED] - http://fotap.org/~osi