[JDEV] Finding the client port from an MIO socket

Keith Minkler kminkler at jabber.com
Tue Jun 12 18:21:40 CDT 2001


MIO doesn't keep track of the remote port, but it does keep the remote IP in the m->ip member..

as far as I can remember, pth doesn't offer any help getting the remote port, and you will
have to use normal socket functions.


On Mon, Jun 11, 2001 at 11:49:59AM +1000, Robert Norris wrote:
> I'm messing with MIO, and on thing I haven't been able to do is find the
> remote port of a connection after it has been accepted (in the callback
> passed to mio_listen).
> 
> Is there an easy way to do this (perhaps via PTH), or am I just going to
> have to do all the normal sockaddr, htons, etc stuff that gets done with
> "normal" IO? (the details slip my mind, perhaps time to track down my copy
> of Stevens).
> 
> Ta,
> Rob.
> 
> -- 
> Robert Norris                                          <rob at nauseum.org>
> 1024D/FC18E6C2        6FBF 098A A3F2 A728 490F  7743 59BD 7767 FC18 E6C2


Keith Minkler

-------
Software Developer
Jabber.COM, Inc.
-------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20010612/3ba904c4/attachment-0002.pgp>


More information about the JDev mailing list