mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fedechicco <fedechi...@gmail.com>
Subject UDP bind problem
Date Mon, 07 May 2007 09:30:30 GMT
Hi everybody, it's really nice to write you again.

I'm developing a brand new RoboCup Simulation agent (client), with MINA
obviously, and I've got some tricky problems because I don't know anything
about UDP.
This protocol oblige me to make more or less this anomalous procedure,
everything in UDP:

Client <localIP:localport>  ----->   Server <serverIP:serverPort_1>
Server <serverIP:serverPort_2>  ------>   Client <localIP:localport>
Client <localIP:localport>    ----------->   Server <serverIP:serverPort_2>
etc etc...

the client sends an handshake message to the server:port 1, and the server
uses another port (port2) to talk to the client, sending messages to
localIP:localPort.
I tried to implement that with an Acceptor in bind on local port and _after_
a connector, but mina doesn't like it very much: in any case I'm obliged to
close every connection that uses the local port _before_ i try to bind it
with an acceptor, otherwise I get a bind exception.
So now i'm in this situation:

create Connector
connect
write
close & join close
create acceptor
bind

But the server usually sends me the first message before i succeeded in
binding: therefore I lose the message.

I'm stuck, i'll really appreciate any help. I'm using MINA 1.0.2 with java5,
i'm ok with upgrading or downgrading to any other version if this can help.

Thanks!

Federico Bonelli

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message