UDP Proxy Exceptions

Trustin Lee (이희승) trustin at gmail.com
Fri Oct 16 03:15:36 EDT 2009


Hi Markus,

Perhaps I'm too late, but here's the answer - you have to call
MessageEvent.getRemoteAddress() instead of Channel.getRemoteAddress()
if the channel is not connected.  This behavior was documented in the
javadoc of Channel.getRemoteAddress().

HTH

— Trustin Lee, http://gleamynode.net/



On Thu, Oct 1, 2009 at 7:23 PM, Markus DE <HL7975 at gmx.de> wrote:
>
> I think I haven't explained my problem well enough or the topic description
> isnt very meaningful.
>
> This is basically what I'm trying to achieve:
>
> Let's take a simple application, which communicates to an endpoint (server)
> via UDP.
>
> In my case I dont want to talk directly to the server, I want to handle
> communication through a proxy:
>
> UDP client --- > proxy server ---- > (forwards data to a predefined endpoint
> ---> server
>               netty-server, netty-client
>
> So packets coming from the "UDP client" arrive at the proxy server and
> should be forwarded by a netty-client to the real destination. This works so
> far, but when packets are sent from the desitnation server and then should
> be forwarded to the real "UDP client" I get the exceptions.
>
> In the nopaste source, its like 68:
>
> sourceChannel.write(e.getMessage(),
> ((DatagramChannel)sourceChannel).getRemoteAddress());
>
> I hope this helps.
> --
> View this message in context: http://n2.nabble.com/UDP-Proxy-Exceptions-tp3731694p3748118.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>



More information about the netty-users mailing list