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.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupgolang-nuts @
postedApr 23, '14 at 9:13p
activeApr 23, '14 at 9:33p

2 users in discussion

Sanjayss: 1 post Sanjay: 1 post



site design / logo © 2022 Grokbase