a net.Addr back.
Sanjay
On Wednesday, April 23, 2014 1:04:27 PM UTC-7, sanj...@gmail.com wrote:
When communicating with a tftp server (UDP), the initial datagram goes to
a well-known port on the server, but the server uses an ephemeral port to
respond to the client for subsequent messages and the client is supposed to
use the new ephemeral port number for subsequent messages. But it seems
like the way the net module is designed, it doesn't provide a mechanism to
retrieve this subsequent port number.
Doing localConn.RemoteAddr() where localConn is from one of the Listen
API's does not work (returns a nil interface). Doing
remoteConn.RemoteAddr() where remoteConn is from one of the Dial API's does
not work either because it returns the original well-known port number.
Is there some other method of retrieve this that I am missing?
--When communicating with a tftp server (UDP), the initial datagram goes to
a well-known port on the server, but the server uses an ephemeral port to
respond to the client for subsequent messages and the client is supposed to
use the new ephemeral port number for subsequent messages. But it seems
like the way the net module is designed, it doesn't provide a mechanism to
retrieve this subsequent port number.
Doing localConn.RemoteAddr() where localConn is from one of the Listen
API's does not work (returns a nil interface). Doing
remoteConn.RemoteAddr() where remoteConn is from one of the Dial API's does
not work either because it returns the original well-known port number.
Is there some other method of retrieve this that I am missing?
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.