History log of /haiku/headers/os/net/NetEndpoint.h
Revision Date Author Comments
# dcc56bf7 24-Nov-2013 Michael Lotz <mmlr@mlotz.ch>

BNetEndpoint: Fix socket leak and reduce Accept() overhead.

When using the copy constructor of BNetEndpoint the socket of the
original endpoint gets dup'ed. The Accept() method later directly reset
the fSocket member of the newly created BNetEndpoint to the socket
returned by accept(). The socket dup'ed by the copy constructor was
therefore leaked.

Of course dup'ing the socket and copying the local and remote addresses
is superfluous in the accept case, as these members all get set to new
values. To reduce that overhead there is now a new private constructor
that directly gets the final socket and remote and local address.


# 49a22456 13-Jul-2008 Oliver Tappe <zooey@hirschkaefer.de>

Overhauled BNetEndpoint implementation (and BNetAddress, too):
* added NetEndpointTest that exposed a couple of bugs
* fixed several bugs in the implementation of BNetEndpoint, some of which kept
NetPenguin from working
* fixed a couple of constness issues in BNetEndpoint and BNetAddress


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26405 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 241b0480 28-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed build of libnetapi.so - it probably won't work for now, though, have a look
at the comment in r5_compatibility.h.
* Intentionally broke source compatibility and removed all that outdated Nettle stuff.
* Also, I took the liberty of making m_init private and rename it to fInit - again, this
will only affect source compatibility.
* Rewrote NetEndpoint.h
* Fixed quite a few small bugs around the code that I touched, for example in NetAddress,
SetTo() never set fInit, and therefore could be wrong.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18680 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 200ec026 13-Aug-2004 Philippe Houdoin <philippe.houdoin@gmail.com>

Remove const that breaks binary compatibility (const are mangled too).
Thanks axeld to point at them.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8569 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c7147473 13-Aug-2004 Philippe Houdoin <philippe.houdoin@gmail.com>

Binary compatibility gurus are welcomed to check it and report.
Fix a typo present since Be's days...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8565 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4c44e39a 28-Aug-2002 Philippe Houdoin <philippe.houdoin@gmail.com>

Initial checkin of C++ BeOS Net API include files.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@918 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dcc56bf748e948579a72e484633c6c9d86b01132 24-Nov-2013 Michael Lotz <mmlr@mlotz.ch>

BNetEndpoint: Fix socket leak and reduce Accept() overhead.

When using the copy constructor of BNetEndpoint the socket of the
original endpoint gets dup'ed. The Accept() method later directly reset
the fSocket member of the newly created BNetEndpoint to the socket
returned by accept(). The socket dup'ed by the copy constructor was
therefore leaked.

Of course dup'ing the socket and copying the local and remote addresses
is superfluous in the accept case, as these members all get set to new
values. To reduce that overhead there is now a new private constructor
that directly gets the final socket and remote and local address.


# 49a22456ddda2a7cfc5c19d9ccc131125b8b690c 13-Jul-2008 Oliver Tappe <zooey@hirschkaefer.de>

Overhauled BNetEndpoint implementation (and BNetAddress, too):
* added NetEndpointTest that exposed a couple of bugs
* fixed several bugs in the implementation of BNetEndpoint, some of which kept
NetPenguin from working
* fixed a couple of constness issues in BNetEndpoint and BNetAddress


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26405 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 241b048033e34efa942d1f43f8d199d086b07743 28-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

* Fixed build of libnetapi.so - it probably won't work for now, though, have a look
at the comment in r5_compatibility.h.
* Intentionally broke source compatibility and removed all that outdated Nettle stuff.
* Also, I took the liberty of making m_init private and rename it to fInit - again, this
will only affect source compatibility.
* Rewrote NetEndpoint.h
* Fixed quite a few small bugs around the code that I touched, for example in NetAddress,
SetTo() never set fInit, and therefore could be wrong.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18680 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 200ec0269e02ee0f2372b0f8db8bee2eb33cdf75 13-Aug-2004 Philippe Houdoin <philippe.houdoin@gmail.com>

Remove const that breaks binary compatibility (const are mangled too).
Thanks axeld to point at them.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8569 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c7147473658553869623afab18c936eda2fc1130 13-Aug-2004 Philippe Houdoin <philippe.houdoin@gmail.com>

Binary compatibility gurus are welcomed to check it and report.
Fix a typo present since Be's days...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8565 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4c44e39a3a0c536defeb878c915e81d433b79170 28-Aug-2002 Philippe Houdoin <philippe.houdoin@gmail.com>

Initial checkin of C++ BeOS Net API include files.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@918 a95241bf-73f2-0310-859d-f6bbb57e9c96