Alsmost TLS
This commit is contained in:
1 parent
43a24b900a
commit
d373a2e4a0
8 files changed
+44
-36
No files matched your search
@@ -29,8 +29,7 @@ namespace core {
|
||||
/// receiving the EPOLLOUT event then the buffer is written to the socket output.
|
||||
///
|
||||
|
||||
class Socket : public std::streambuf,
|
||||
public core::Object {
|
||||
class Socket : public core::Object {
|
||||
|
||||
public:
|
||||
|
||||
@@ -41,6 +40,11 @@ namespace core {
|
||||
|
||||
void shutdown();
|
||||
|
||||
///
|
||||
/// setDescriptor establishes the file descriptor for the socket and registers the socket
|
||||
/// on the EPoll controller. setDescriptor will invoke the onRegister() event.
|
||||
///
|
||||
|
||||
void setDescriptor(int descriptor); ///<Set the descriptor for the socket.
|
||||
|
||||
int getDescriptor(); ///< Get the descriptor for the socket.
|
||||
@@ -76,20 +80,23 @@ namespace core {
|
||||
void output(std::stringstream &out);
|
||||
|
||||
///
|
||||
/// The onRegistered method is called whenever the socket is registered with
|
||||
/// ePoll and socket communcation events can be started.
|
||||
/// The onRegister method is called before the socket is registered with
|
||||
/// ePoll so objects extending the Socket definition can initialize the socket
|
||||
/// before receiving events. Evoked when the
|
||||
/// descriptor is set using setDescriptor for the socket.
|
||||
///
|
||||
|
||||
virtual void onRegistered(); ///< Called when the socket has finished registering with the epoll processing.
|
||||
|
||||
virtual void onRegister(); ///< Called when the socket has finished registering with the epoll processing.
|
||||
virtual void onRegistered();
|
||||
|
||||
///
|
||||
/// The onUnregistered method is called whenever the socket is unregistered with
|
||||
/// The onUnregister method is called whenever the socket is unregistered with
|
||||
/// ePoll and socket communcation events will be stopped. The default method will
|
||||
/// close the socket and clean up the connection. If this is overridden by an
|
||||
/// extended object then the object should call this method to clean the socket up.
|
||||
///
|
||||
|
||||
virtual void onUnregistered(); ///< Called when the socket has finished unregistering for the epoll processing.
|
||||
virtual void onUnregister(); ///< Called when the socket has finished unregistering for the epoll processing.
|
||||
|
||||
void enable(bool mode); ///< Enable the socket to read or write based upon buffer.
|
||||
|
||||
@@ -107,7 +114,7 @@ namespace core {
|
||||
/// remote device.
|
||||
///
|
||||
|
||||
virtual void onConnected(); ///< Called when socket is open and ready to communicate.
|
||||
// virtual void onConnected(); ///< Called when socket is open and ready to communicate.
|
||||
|
||||
///
|
||||
///
|
||||
|
||||
Reference in new issue
Block a user