76

Re: RESTinio 0.3: header-only a C ++ 14 library with HTTP/Websock with

Hello, so5team, you wrote: Already someone works over epoll for Windows: https://github.com/piscisaureus/wepoll Truth here write that it not so easily to make.

77

Re: RESTinio 0.3: header-only a C ++ 14 library with HTTP/Websock with

Hello, c-smile, you wrote: CS> And it about ws: or about wss: (secured web sockets) too? Yes, wss too it is supported. For possibility to test we added an example websocket_wss.

78

Re: RESTinio 0.3: header-only a C ++ 14 library with HTTP/Websock with

Hello, so5team, you wrote: S> Hello, pkl, you wrote: pkl>> There is no binding to boost or to other network library, at lower layer class TCP of the server implemented on epoll lies, but it is possible to change everything the with similar API. S> I.e. from a box works only under Unix, correctly? Yes. But at windows there are any adapters, I heard even ubuntu in Windows is. https://habrahabr.ru/post/280560/And somehow as a whole the Windows as the server are not too critical, more and more in  the people in the world do servers, therefore to be sharpened under epoll it is possible with so clear conscience that water in  envies! Well and to write the classic under the given interface https://github.com/pavelkolodin/fir/blo … er_epoll.h it is simple.

79

Re: RESTinio 0.3: header-only a C ++ 14 library with HTTP/Websock with

Hello, pkl, you wrote: S>> I.e. from a box works only under Unix, correctly? pkl> yes.... pkl> Well and to write the classic under the given interface https://github.com/pavelkolodin/fir/blo … er_epoll.h it is simple. The question was set as though from a position of the potential user to which it is necessary a cross connect-platformennost "from a box". Not all take another's tool if it needs still something independently . We just did RESTinio that  it was necessary nothing.

80

Re: RESTinio 0.3: header-only a C ++ 14 library with HTTP/Websock with

Hello, pkl, you wrote: pkl> Input HTTP/1.1  protocol with minimum kol-vom copyings of the data. pkl> Rasparsennyj HTTP represents simply a dial-up of pointers on different places in the input buffer where the data flew initially. pkl> there is no binding to boost or to other network library, at lower layer class TCP of the server implemented on epoll lies, but it is possible to change everything the with similar API. pkl> It is written on motives of interiors nginx. A minimum new/delete, all . Is extremely interesting sounds. What plans on development or it is pure just for fun? Output agents of requests where and how are processed?

81

Re: RESTinio 0.3: header-only a C ++ 14 library with HTTP/Websock with

Hello, MTD, you wrote: MTD> Hello, pkl, you wrote: pkl>> Input HTTP/1.1  protocol with minimum kol-vom copyings of the data. pkl>> Rasparsennyj HTTP represents simply a dial-up of pointers on different places in the input buffer where the data flew initially. pkl>> there is no binding to boost or to other network library, at lower layer class TCP of the server implemented on epoll lies, but it is possible to change everything the with similar API. pkl>> It is written on motives of interiors nginx. A minimum new/delete, all . MTD> is extremely interesting sounds. What plans on development or it is pure just for fun? Output agents of requests where and how are processed? Just For Fun it is finite, I am the private person, instead of the organization. Plans can be when you can guarantee them, and that can guarantee the private person without the contract. Approximate plans -  as the core network  in the fun-projects to finish as required,  as the wave rolls. TCPServerEpoll is a template class where it is necessary to transfer a class of factory of resources. When the TCP-connection TCPServerEpoll climbs in factory of resources comes and speaks "give object of a connection for type 70" where 70 is that that the user specified at port discovery in listening. The object can be new or is taken from the list of free (). The factory understands that 70 is HTTP a connection, for example. There their all some types from a box, are for example primitive "bin" the protocol for dialogue of demons among themselves. All connections inherit class Connection, which methods eventRead (), eventWrite (), eventClose () and pulls TCPServerEpoll at appropriate events. Further in each specific child type Connection there are the eventRead (), etc. But the general one - itself read from a descriptor given where it is necessary to you. Pursuing a policy of minimum copying of the data, TCPServerEpoll does not try to read itself the data in temporal  which then gives abstract . It is made as in nginx: whether start up  itself solves it is necessary to it to read generally this data and start up itself reads AT ONCE in that buffer where they will be necessary and so much how many it is necessary, instead of is engaged in copying from our buffer. Therefore in ConnectionHTTP for example, depending on a state (that we now try to read -  or BODY) the data is read in different , etc. Here start procedure of data reading in ConnectionHTTP https://github.com/pavelkolodin/fir/blo … ttp.h#L285 - she reads and assorts headers. There is concept Responder. It is type "" - there "" and live (example Responder) Responder is transferred as sample in factory. When ConnectionHTTP  the request also understood that request normal, he speaks to factory - give Responder, I will answer! Further something becomes type responder-> dataHTTP (this) and the answer goes reversely. At Responder there should be methods dataHTTP, dataWS, dataBin, closeHTTP, closeWS, closeBin differently not . It also is . In them to you give bare headers, cookies, body and do with them that you want. There is there any answer buffer, there it is possible  the answer and to return, and ConnectionHTTP itself sends the answer. ConnectionHTTP on finite state machines - the data can come any slices. Some pieces are not implemented - for example there is no support gzip, is not present HTTP Range_requests, there is still no important hogwash. But from a box is miltipart/form-data - it is possible  HTTP-formochki . ConnectionWebSocket it is implemented too on finite state machines, works stablly. In it there is a pair of superfluous copyings of the data (because of  with questions of possession of buffers). Also in it there is a pair of any minor moments, type of working off PING\PONG though can and  - do not remember. In  on http://fintank.ru this ConnectionWebSocket like stablly works as hours, but I over it still would work. As a whole fir it is necessary a little , there the part is written when I still the juvenile moron was - under c ++ 14 it is necessary to brush, about  CPU to think, lock-free to implement,  foolish to throw out if is...

82

Re: RESTinio 0.3: header-only a C ++ 14 library with HTTP/Websock with

Hello, pkl, you wrote: pkl> As a whole fir it is necessary a little , there the part is written when I still the juvenile moron was - under c ++ 14 it is necessary to brush, about  CPU to think, lock-free to implement,  foolish to throw out if is... First of all autotests are necessary. Autotests are aaplets which speak OK/FAIL at start. And those tests that in turnip lie, it is better to delete