This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/feature/WWM-91' into develop
- Loading branch information
Showing
32 changed files
with
116 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
ifndef TOPDIR | ||
TOPDIR := $(abspath ../../../../) | ||
endif | ||
|
||
ifndef DSTDIR | ||
DSTDIR := $(abspath ../../) | ||
endif | ||
|
||
include $(TOPDIR)/config/makefile/common.mk | ||
|
||
DIRS := ClientReadHandler \ | ||
ClientWriteHandler \ | ||
FileReadHandler \ | ||
FileWriteHandler \ | ||
ServerReadHandler | ||
|
||
include $(TOPDIR)/config/makefile/objRecipes.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
ifndef TOPDIR | ||
TOPDIR := $(abspath ../../../../) | ||
endif | ||
|
||
ifndef DSTDIR | ||
DSTDIR := $(abspath ../../) | ||
endif | ||
|
||
include $(TOPDIR)/config/makefile/common.mk | ||
|
||
SRCS := $(addprefix $(DSTDIR)/objs/, SharedData.cpp) | ||
|
||
OBJS := $(SRCS:.cpp=.o) | ||
DEPS := $(SRCS:.cpp=.d) | ||
|
||
-include $(DEPS)erverReadHandler | ||
|
||
include $(TOPDIR)/config/makefile/objRecipes.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "SharedData.hpp" | ||
|
||
namespace reactor { | ||
SharedData::SharedData(const fd_t fd, const enum EventType type, std::vector<char> buffer) | ||
: _fd(fd), _type(type), _buffer(buffer), _state(PENDING){}; | ||
|
||
SharedData::SharedData(const SharedData& obj) | ||
: _fd(obj._fd), _type(obj._type), _buffer(obj._buffer), _state(obj._state){}; | ||
|
||
SharedData::~SharedData(){}; | ||
|
||
SharedData& SharedData::operator=(const SharedData& obj) { | ||
if (this != &obj) { | ||
const_cast<fd_t&>(this->_fd) = obj._fd; | ||
const_cast<enum EventType&>(this->_type) = obj._type; | ||
this->_buffer = obj._buffer; | ||
this->_state = obj._state; | ||
} | ||
return *this; | ||
}; | ||
|
||
} // namespace reactor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#pragma once | ||
#ifndef SHAREDDATA_H | ||
#define SHAREDDATA_H | ||
|
||
#include "enum.h" | ||
#include "shared_ptr.hpp" | ||
#include "types.h" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#pragma once | ||
#ifndef SHAREDDATA_HPP | ||
#define SHAREDDATA_HPP | ||
|
||
#include "SharedData.h" | ||
|
||
namespace reactor { | ||
class SharedData { | ||
private: | ||
const fd_t _fd; | ||
const enum EventType _type; | ||
std::vector<char> _buffer; | ||
enum AsyncState _state; | ||
|
||
public: | ||
SharedData(const fd_t fd, const enum EventType type, std::vector<char> buffer); | ||
SharedData(const SharedData& obj); | ||
~SharedData(); | ||
SharedData& operator=(const SharedData& obj); | ||
|
||
fd_t getFd() const { return this->_fd; }; | ||
enum EventType getType() const { return this->_type; }; | ||
std::vector<char>& getBuffer() { return this->_buffer; }; | ||
enum AsyncState getState() const { return this->_state; }; | ||
void setState(const enum AsyncState state) { this->_state = state; }; | ||
}; | ||
|
||
typedef utils::shared_ptr<SharedData> sharedData_t; | ||
}; // namespace reactor | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters