libbnetapi: Extend socket classes

Operating Systems / Haiku - Rene Gollent [gollent.com] - 28 April 2016 21:30 UTC

B{Abstract,Datagram,Secure}Socket:- Add functionality to listen for and accept new connections, thus allowing one to use the socket classes for server functionality as well.

BSecureSocket:- Adjust to take into account differences between how SSL needs to be called when accepting an incoming connection vs initiating an outbound one. The handshake on the accepted connection stills fails for unknown reasons at the moment though.

Note that these changes break the ABI, and thus any packages making use of them directly will need a rebuild.

c9dd7d0 libbnetapi: Extend socket classes.
headers/os/net/AbstractSocket.h | 14 +++-
headers/os/net/DatagramSocket.h | 5 +-
headers/os/net/SecureSocket.h | 8 +-
headers/os/net/Socket.h | 11 ++-
src/kits/network/libnetapi/AbstractSocket.cpp | 56 +++++++++++++-
src/kits/network/libnetapi/DatagramSocket.cpp | 11 ++-
src/kits/network/libnetapi/ProxySecureSocket.cpp | 2 +-
src/kits/network/libnetapi/SecureSocket.cpp | 88 +++++++++++++++++++++-
src/kits/network/libnetapi/Socket.cpp | 26 ++++++-
9 files changed, 198 insertions(+), 23 deletions(-)

Upstream: cgit.haiku-os.org


  • Share