diff --git a/src/sockets/ssl.hpp b/src/sockets/tls.hpp similarity index 87% rename from src/sockets/ssl.hpp rename to src/sockets/tls.hpp index 16c4fb342f..e3c868b9ae 100644 --- a/src/sockets/ssl.hpp +++ b/src/sockets/tls.hpp @@ -25,8 +25,8 @@ * */ -#ifndef WEBSOCKETPP_SOCKET_SSL_HPP -#define WEBSOCKETPP_SOCKET_SSL_HPP +#ifndef WEBSOCKETPP_SOCKET_TLS_HPP +#define WEBSOCKETPP_SOCKET_TLS_HPP #include "socket_base.hpp" @@ -40,11 +40,11 @@ namespace websocketpp { namespace socket { template -class ssl { +class tls { public: - typedef ssl type; - typedef boost::asio::ssl::stream ssl_socket; - typedef boost::shared_ptr ssl_socket_ptr; + typedef tls type; + typedef boost::asio::ssl::stream tls_socket; + typedef boost::shared_ptr tls_socket_ptr; // should be private friended boost::asio::io_service& get_io_service() { @@ -52,7 +52,7 @@ public: } // should be private friended? - ssl_socket::handshake_type get_handshake_type() { + tls_socket::handshake_type get_handshake_type() { if (static_cast< endpoint_type* >(this)->is_server()) { return boost::asio::ssl::stream_base::server; } else { @@ -76,11 +76,11 @@ public: class connection { public: // should these two be public or protected. If protected, how? - ssl_socket::lowest_layer_type& get_raw_socket() { + tls_socket::lowest_layer_type& get_raw_socket() { return m_socket_ptr->lowest_layer(); } - ssl_socket& get_socket() { + tls_socket& get_socket() { return *m_socket_ptr; } @@ -88,7 +88,7 @@ public: return true; } protected: - connection(ssl& e) + connection(tls& e) : m_endpoint(e), m_connection(static_cast< connection_type& >(*this)) {} @@ -99,7 +99,7 @@ public: throw "handler was unable to init tls, connection error"; } - m_socket_ptr = ssl_socket_ptr(new ssl_socket(m_endpoint.get_io_service(),*m_context_ptr)); + m_socket_ptr = tls_socket_ptr(new tls_socket(m_endpoint.get_io_service(),*m_context_ptr)); } void async_init(boost::function callback) @@ -140,18 +140,18 @@ public: } private: boost::shared_ptr m_context_ptr; - ssl_socket_ptr m_socket_ptr; - ssl& m_endpoint; + tls_socket_ptr m_socket_ptr; + tls& m_endpoint; connection_type& m_connection; }; protected: - ssl (boost::asio::io_service& m) : m_io_service(m) {} + tls (boost::asio::io_service& m) : m_io_service(m) {} private: boost::asio::io_service& m_io_service; - ssl_socket::handshake_type m_handshake_type; + tls_socket::handshake_type m_handshake_type; }; } // namespace socket } // namespace websocketpp -#endif // WEBSOCKETPP_SOCKET_SSL_HPP +#endif // WEBSOCKETPP_SOCKET_TLS_HPP diff --git a/websocketpp.xcodeproj/project.pbxproj b/websocketpp.xcodeproj/project.pbxproj index 5b1369fdf1..4b16ebd514 100644 --- a/websocketpp.xcodeproj/project.pbxproj +++ b/websocketpp.xcodeproj/project.pbxproj @@ -222,7 +222,6 @@ B62A5A561473EBE8005F9EB0 /* client.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = client.hpp; path = src/roles/client.hpp; sourceTree = ""; }; B62A5A571473EBE8005F9EB0 /* server.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = server.hpp; path = src/roles/server.hpp; sourceTree = ""; }; B62A5A581473EBF1005F9EB0 /* plain.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = plain.hpp; path = src/sockets/plain.hpp; sourceTree = ""; }; - B62A5A591473EBF1005F9EB0 /* ssl.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = ssl.hpp; path = src/sockets/ssl.hpp; sourceTree = ""; }; B62A5A6114755443005F9EB0 /* socket_base.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = socket_base.hpp; path = src/sockets/socket_base.hpp; sourceTree = ""; }; B62A5A6B147748B2005F9EB0 /* hybi.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = hybi.hpp; sourceTree = ""; }; B62A5A6C147748B2005F9EB0 /* hybi_legacy.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = hybi_legacy.hpp; sourceTree = ""; }; @@ -293,6 +292,8 @@ B6CF18161437C370009295BE /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; B6CF181C1437C397009295BE /* echo_client */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = echo_client; sourceTree = BUILT_PRODUCTS_DIR; }; B6CF182B1437C3CA009295BE /* libboost_system.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libboost_system.dylib; path = usr/local/lib/libboost_system.dylib; sourceTree = SDKROOT; }; + B6DE901314C4D875009A1591 /* readme.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = readme.txt; sourceTree = ""; }; + B6DE901514C5BED0009A1591 /* tls.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = tls.hpp; path = src/sockets/tls.hpp; sourceTree = ""; }; B6DF1C691434A7A30029A1B1 /* libwebsocketpp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libwebsocketpp.a; sourceTree = BUILT_PRODUCTS_DIR; }; B6DF1C721434A8280029A1B1 /* libwebsocketpp.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libwebsocketpp.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; B6DF1C791434AB740029A1B1 /* network_utilities.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = network_utilities.cpp; path = src/network_utilities.cpp; sourceTree = ""; }; @@ -482,7 +483,7 @@ children = ( B62A5A6114755443005F9EB0 /* socket_base.hpp */, B62A5A581473EBF1005F9EB0 /* plain.hpp */, - B62A5A591473EBF1005F9EB0 /* ssl.hpp */, + B6DE901514C5BED0009A1591 /* tls.hpp */, ); name = sockets; sourceTree = ""; @@ -646,6 +647,7 @@ B6DF1CC61435ED380029A1B1 /* examples */, B6DF1CC51435ECE40029A1B1 /* libraries */, B6138791145CA6F700ED9B19 /* Makefile */, + B6DE901314C4D875009A1591 /* readme.txt */, B64E12D014BDE132006F20F0 /* test */, B6DF1C7F1434ABB70029A1B1 /* src */, B6DF1C6A1434A7A30029A1B1 /* Products */,