Coder Social home page Coder Social logo

awwit / httpserver Goto Github PK

View Code? Open in Web Editor NEW
169.0 169.0 68.0 469 KB

Http server is written on C++14 language. Dynamic libraries act as applications for the server (*.so - linux, *.dll - windows).

License: GNU Affero General Public License v3.0

C++ 98.56% QML 1.24% Makefile 0.20% C 0.01%
c-plus-plus http http2 https httpserver

httpserver's People

Contributors

awwit avatar wuyougongzi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

httpserver's Issues

The global scope :: doesn't works fine for a function which is a #define

Such as:

src/server/protocol/ServerHttp2.cpp:501:63: error: expected unqualified-id
*reinterpret_cast<uint32_t *>(addr + sizeof(uint32_t) ) = ::htonl(
^
/usr/include/sys/_endian.h:136:18: note: expanded from macro 'htonl'
#define htonl(x) __DARWIN_OSSwapInt32(x)
^
/usr/include/libkern/_OSByteOrder.h:75:5: note: expanded from macro '__DARWIN_OSSwapInt32'
(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt32(x) : _OSSwapInt32(x))

make gnutls problem

hi, I am interested in this project, I want to learn from that. so I clone piece. I excute make command. It prints gnutls file can not find.
then I use apt-get to install gnutls. like this "sudo apt-get install gnutls-bin". But it still prints gnutls function undefined reference, like these: " 'gnutls_record_recv' Undefined reference" , " 'gnutls_bye' Undefined reference " and so on.
I use ubuntu 16.04. , Have you ever been in this situation? So you counld help me to slove this problem.

Start problem

After I compiled success. I try to run server. But I start server failed.
first, I use " ./build/httpserver --start " command to start.
It failed. and tips "Error: file main.conf cannot be open"
Second, I use "./build/httpserver --start --config-path=/home/chongge/httpserver/samples/" , I think --config-path represents the main.conf path dir.
but it faile again and tips "/media/projects/sites/servertest/module/httpserverapp-release.so: cannot open shared object file: No such file or directory
Error: module '/media/projects/sites/servertest/module/httpserverapp-release.so' cannot be open;
Notice: server does not contain applications;
Error: any socket was not open;"

I try to find the httpserverapp file. Is the httpserverapp.so your another project? why starting httpserver have to depent httpserverapp.so? And how can I start httpserver simple?
I have learned the web page develop. So I could create web page to test the httpserver.
I hope to you can teach me the httpserver.

thank you for your help!

Error occurred when make

$ make
g++ -DPOSIX -std=c++14 -c -Wall -O2 src/socket/Socket.cpp -o build/obj/socket/Socket.o
In file included from /usr/include/x86_64-linux-gnu/bits/byteswap.h:35:0,
from /usr/include/endian.h:60,
from /usr/include/x86_64-linux-gnu/sys/types.h:216,
from src/socket/../system/System.h:30,
from src/socket/Socket.h:3,
from src/socket/Socket.cpp:2:
src/socket/Socket.cpp: In member function ‘bool Socket::Socket::bind(int) const’:
src/socket/Socket.cpp:108:6: error: expected id-expression before ‘(’ token
::htons(port),
^
make: *** [build/obj/socket/Socket.o] Error 1

error occurred when make this project

Make failed on mac os x.
Error message as blow:

c++ -DPOSIX -std=c++14 -c -Wall -O2 src/transfer/FileIncoming.cpp -o build/obj/transfer/FileIncoming.o
c++ -DPOSIX -std=c++14 -c -Wall -O2 src/transfer/http2/HPack.cpp -o build/obj/transfer/http2/HPack.o
c++ -DPOSIX -std=c++14 -c -Wall -O2 src/transfer/http2/Http2.cpp -o build/obj/transfer/http2/Http2.o
src/transfer/http2/Http2.cpp:174:47: error: expected unqualified-id
*reinterpret_cast<uint32_t *>(addr + 5) = ::htonl(this->stream_id);
^
/usr/include/sys/_endian.h:136:18: note: expanded from macro 'htonl'
#define htonl(x) __DARWIN_OSSwapInt32(x)
^
/usr/include/libkern/_OSByteOrder.h:75:5: note: expanded from macro '__DARWIN_OSSwapInt32'
(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt32(x) : _OSSwapInt32(x))
^
src/transfer/http2/Http2.cpp:233:47: error: expected unqualified-id
*reinterpret_cast<uint32_t *>(addr + 5) = ::htonl(this->stream_id);
^
/usr/include/sys/_endian.h:136:18: note: expanded from macro 'htonl'
#define htonl(x) __DARWIN_OSSwapInt32(x)
^
/usr/include/libkern/_OSByteOrder.h:75:5: note: expanded from macro '__DARWIN_OSSwapInt32'
(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt32(x) : _OSSwapInt32(x))
^
2 errors generated.
make: *** [build/obj/transfer/http2/Http2.o] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.