Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipDeegan committed Jun 16, 2024
1 parent cae03b6 commit 0b3a0de
Show file tree
Hide file tree
Showing 54 changed files with 346 additions and 404 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/build_win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,23 @@ jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64

- uses: actions/setup-python@v2
with:
python-version: '3.9.6' # 3.10 is possibly too new
python-version: '3.11.9'

- name: "Build/Test"
shell: cmd
env:
MKN_CL_PREFERRED: 1
run: | # /bin/link interferes with cl/link.exe
bash -c "rm /bin/link"
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
bash -c "python3 -m pip install wheel --upgrade"
bash -c "python3 -m pip install conan --upgrade"
bash -c "mkdir -p /c/Users/runneradmin/.conan && cp remotes.json /c/Users/runneradmin/.conan/remotes.json"
bash -c "curl -Lo mkn.exe https://github.com/PhilipDeegan/mkn/releases/download/latest/mkn.exe"
bash -c "python3 -m pip install wheel -U && python3 -m pip install conan -U"
bash -c "mkdir -p /c/Users/runneradmin/.conan && cp conan_remotes.json /c/Users/runneradmin/.conan/remotes.json"
bash -c "curl -Lo mkn.exe https://github.com/mkn/mkn/releases/download/latest/mkn.exe"
bash -c 'KLOG=3 ./mkn clean build -dtKOp test -a "-EHsc -std:c++17"'
20 changes: 20 additions & 0 deletions .sublime-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"folders":
[
{
"path": ".",
},
],
"settings":
{
"ClangFormat":
{
"binary": "clang-format",
"format_on_save": true,
"style": "file",
},
"python-black": {
"format_on_save": "on",
},
},
}
3 changes: 3 additions & 0 deletions .sublime-project.sublime-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"project": ".sublime-project"
}
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2013, Philip Deegan.
Copyright (c) 2024, Philip Deegan.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
9 changes: 1 addition & 8 deletions README.noformat
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,10 @@ C++ Remote Applications Management
Convenience library providing cross platform http/https services

How to use:
view tst/kul.ram.test.hpp
view test/usage.cpp

License: BSD

OpenSSL on Windows found @
https://www.npcglib.org/~stathis/blog/precompiled-openssl/

mkn command for compiling with windows looks like

mkn clean build -dtKa "-EHsc -Zc:inline -O2 -MT" -l "libsslMT.lib libcryptoMT.lib Crypt32.lib User32.lib"

Switches - OSX is considered BSD for swiches unless otherwise noted

Key __MKN_RAM_TCP_BIND_SOCKTOPTS__
Expand Down
25 changes: 0 additions & 25 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion conanfile.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[requires]
OpenSSL/1.1.0k@conan/stable
openssl/3.2.2
5 changes: 3 additions & 2 deletions inc/mkn/ram/asio/fcgi.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
Copyright (c) 2016, Philip Deegan.
Copyright (c) 2024, Philip Deegan.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -44,7 +44,8 @@ namespace fcgi {

class Exception : public mkn::kul::Exception {
public:
Exception(const char* f, const uint16_t& l, const std::string& s) : mkn::kul::Exception(f, l, s) {}
Exception(const char* f, const uint16_t& l, const std::string& s)
: mkn::kul::Exception(f, l, s) {}
};

class Server;
Expand Down
2 changes: 1 addition & 1 deletion inc/mkn/ram/html/def.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
Copyright (c) 2016, Philip Deegan.
Copyright (c) 2024, Philip Deegan.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion inc/mkn/ram/html/page.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
Copyright (c) 2016, Philip Deegan.
Copyright (c) 2024, Philip Deegan.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down
8 changes: 4 additions & 4 deletions inc/mkn/ram/html/tag.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
Copyright (c) 2016, Philip Deegan.
Copyright (c) 2024, Philip Deegan.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -31,11 +31,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _MKN_RAM_HTML_TAG_HPP_
#define _MKN_RAM_HTML_TAG_HPP_

#include "mkn/kul/except.hpp"
#include "mkn/kul/log.hpp"
#include "mkn/kul/map.hpp"
#include "mkn/kul/except.hpp"
#include "mkn/kul/string.hpp"

#include "mkn/ram/html/def.hpp"

namespace mkn {
Expand Down Expand Up @@ -134,7 +133,8 @@ namespace tag {

class Exception : public mkn::kul::Exception {
public:
Exception(const char* f, const uint16_t& l, const std::string& s) : mkn::kul::Exception(f, l, s) {}
Exception(const char* f, const uint16_t& l, const std::string& s)
: mkn::kul::Exception(f, l, s) {}
};

class Named : public Tag {
Expand Down
5 changes: 3 additions & 2 deletions inc/mkn/ram/html4.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
Copyright (c) 2016, Philip Deegan.
Copyright (c) 2024, Philip Deegan.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -39,7 +39,8 @@ namespace html4 {

class Exception : public mkn::kul::Exception {
public:
Exception(const char* f, const uint16_t& l, const std::string& s) : mkn::kul::Exception(f, l, s) {}
Exception(const char* f, const uint16_t& l, const std::string& s)
: mkn::kul::Exception(f, l, s) {}
};

} // namespace html4
Expand Down
6 changes: 3 additions & 3 deletions inc/mkn/ram/http.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
Copyright (c) 2013, Philip Deegan.
Copyright (c) 2024, Philip Deegan.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -35,7 +35,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _MKN_RAM_HTTP_HPP_
#define _MKN_RAM_HTTP_HPP_


#include "mkn/kul/map.hpp"
#include "mkn/kul/string.hpp"
#include "mkn/ram/tcp.hpp"
Expand All @@ -48,7 +47,8 @@ typedef std::unordered_map<std::string, std::string> Headers;

class Exception : public mkn::kul::Exception {
public:
Exception(const char* f, const uint16_t& l, const std::string& s) : mkn::kul::Exception(f, l, s) {}
Exception(const char* f, const uint16_t& l, const std::string& s)
: mkn::kul::Exception(f, l, s) {}
};

class Cookie {
Expand Down
6 changes: 3 additions & 3 deletions inc/mkn/ram/http/def.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
Copyright (c) 2016, Philip Deegan.
Copyright (c) 2024, Philip Deegan.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -33,10 +33,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#ifndef _MKN_RAM_HTTP_SESSION_TTL_
#define _MKN_RAM_HTTP_SESSION_TTL_ 600 // seconds
#endif /* _MKN_RAM_HTTP_SESSION_TTL_ */
#endif /* _MKN_RAM_HTTP_SESSION_TTL_ */

#ifndef _MKN_RAM_HTTP_SESSION_CHECK_
#define _MKN_RAM_HTTP_SESSION_CHECK_ 10000 // milliseconds to sleep between checks
#endif /* _MKN_RAM_HTTP_SESSION_CHECK_ */
#endif /* _MKN_RAM_HTTP_SESSION_CHECK_ */

#endif /* _MKN_RAM_HTTP_DEF_HPP_ */
6 changes: 3 additions & 3 deletions inc/mkn/ram/http/session.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
Copyright (c) 2016, Philip Deegan.
Copyright (c) 2024, Philip Deegan.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -31,10 +31,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _MKN_RAM_HTTP_SESSION_HPP_
#define _MKN_RAM_HTTP_SESSION_HPP_

#include "mkn/ram/http.hpp"
#include "mkn/ram/http/def.hpp"
#include "mkn/kul/threads.hpp"
#include "mkn/kul/time.hpp"
#include "mkn/ram/http.hpp"
#include "mkn/ram/http/def.hpp"

namespace mkn {
namespace ram {
Expand Down
7 changes: 3 additions & 4 deletions inc/mkn/ram/https.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
Copyright (c) 2013, Philip Deegan.
Copyright (c) 2024, Philip Deegan.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -38,7 +38,8 @@ namespace ram {
namespace https {
class Exception : public mkn::kul::Exception {
public:
Exception(const char* f, const uint16_t& l, const std::string& s) : mkn::kul::Exception(f, l, s) {}
Exception(const char* f, const uint16_t& l, const std::string& s)
: mkn::kul::Exception(f, l, s) {}
};
} // namespace https
} // namespace ram
Expand All @@ -50,6 +51,4 @@ class Exception : public mkn::kul::Exception {
#include "mkn/ram/os/nixish/https.hpp"
#endif



#endif //_MKN_RAM_INCLUDE_HTTPS_HPP_
5 changes: 3 additions & 2 deletions inc/mkn/ram/mpi.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/**
Copyright (c) 2013, Philip Deegan.
Copyright (c) 2024, Philip Deegan.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -40,7 +40,8 @@ namespace mpi {

class Exception : public mkn::kul::Exception {
public:
Exception(const char* f, const uint16_t& l, const std::string& s) : mkn::kul::Exception(f, l, s) {}
Exception(const char* f, const uint16_t& l, const std::string& s)
: mkn::kul::Exception(f, l, s) {}
};

template <typename Data>
Expand Down
Loading

0 comments on commit 0b3a0de

Please sign in to comment.