FengYue writes:
> Hi there, a quick one.  Is getpeername() considered expensive?
> Would it be much better if I cache the result myself instead of
> calling it everytime on the connected socket(returned from accept) to 
> find out which IP it connects to?

It's not particularly expensive compared to other system calls..
but if you find system calls in general expensive, then it would
certainly count as one :-)

I'd say it's unlikely that this kind of optimization would be
worth the trouble for a 'normal' application.

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to