Reverbrain wiki

Site Tools


thevoid:architecture

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
thevoid:architecture [2013/10/22 16:03]
zbr
thevoid:architecture [2013/11/01 07:04] (current)
elessar
Line 21: Line 21:
 After HTTP request has been parsed, user's handler may be constructed by one of the factories. Currently factory is chosen by the request path, but this behavior may be extended in the future. All the factories must be added to server in **initialize** method at start up. After HTTP request has been parsed, user's handler may be constructed by one of the factories. Currently factory is chosen by the request path, but this behavior may be extended in the future. All the factories must be added to server in **initialize** method at start up.
  
-After user's handler is created it can process **swarm::network_request** and HTTP body as soon as it is read from the socket.+After user's handler is created it can process **swarm::http_request** and HTTP body as soon as it is read from the socket.
  
 When HTTP body has been read and user's handler called **close** method, connection can process next request by the same socket. It's possible only if keep-alive is enabled which by default is true for HTTP 1.1 requests or when "​Connection:​ keep-alive"​ header is present. Otherwise socket is closed and connection is destroyed. When HTTP body has been read and user's handler called **close** method, connection can process next request by the same socket. It's possible only if keep-alive is enabled which by default is true for HTTP 1.1 requests or when "​Connection:​ keep-alive"​ header is present. Otherwise socket is closed and connection is destroyed.
Line 27: Line 27:
 ===== User's handlers ===== ===== User's handlers =====
  
-User's handlers are successors of **thevoid::​base_request_stream**. As soon as this object as created it's **on_headers** method is called with the appropriate **swarm::network_request** container.+User's handlers are successors of **thevoid::​base_request_stream**. As soon as this object as created it's **on_headers** method is called with the appropriate **swarm::http_request** container.
  
 As soon as some part of HTTP body has been read from the socket, **on_data** method is invoked. As soon as some part of HTTP body has been read from the socket, **on_data** method is invoked.
Line 35: Line 35:
 **thevoid::​request_stream** contains a lot of helper methods for logging, zero-copy writing and easy reply generation. **thevoid::​request_stream** contains a lot of helper methods for logging, zero-copy writing and easy reply generation.
  
-If you don't want to handle manually received HTTP body it's possible to use **thevoid::​simple_request_stream**. It accumulates HTTP body into single chunk, so **on_request** is method called with network_request ​and full HTTP body after is has been fully received.+If you don't want to handle manually received HTTP body it's possible to use **thevoid::​simple_request_stream**. It accumulates HTTP body into single chunk, so **on_request** is method called with http_request ​and full HTTP body after is has been fully received.
thevoid/architecture.txt ยท Last modified: 2013/11/01 07:04 by elessar