HTTP request message for the current event (as opposed to an initial HTTP required to triggered a HTTP Chunk or web socket event).
HTTP request message for the current event (as opposed to an initial HTTP required to triggered a HTTP Chunk or web socket event).
Netty HTTP request message
Represents the contents or body of the HTTP request
Represents the contents or body of the HTTP request
Request body
MIME type of the request body
Identifies the end point associated with the firing of an event.
Identifies the end point associated with the firing of an event. In Socko terminology, an end point comprise the request method, host, path and query string.
Web method. eg. GET
.
Host name or IP address
Request URI as per the HTTP request line. For example: /folder/file.html
or
/folder/file.html?param1=value1¶m2=value2
Event fired when a HTTP chunk is received
Event fired when a HTTP chunk is received
The org.mashupbots.socko.events.HttpChunkEvent will only be fired if:
isChunked
property is set to True
.
The initial HTTP request associated with this chunk
Incoming chunk of data for processing
Processing configuration
HTTP chunk sent from client to sever
HTTP chunk sent from client to sever
Netty representation of the HTTP Chunk
Abstract event triggered on HTTP related activity
HTTP event configuration used in the processing of org.mashupbots.socko.events.HttpEvents.
HTTP event configuration used in the processing of org.mashupbots.socko.events.HttpEvents.
Name of this instance of the Socko Web Server
Minimum number of bytes before content will be compressed if requested by
the client. Set to -1
to turn off compression.
Maximum number of bytes before HTTP content will be not be compressed if requested by the client. Defaults to 1MB otherwise too much CPU maybe taken up for compression.
List of MIME types of that can be compressed.
Actor to which web log events to be sent
Represents a HTTP header field
Event fired when the last HTTP chunk is received
Event fired when the last HTTP chunk is received
The org.mashupbots.socko.events.HttpChunkEvent will only be fired if:
isChunked
property is set to True
.The initial HTTP request associated with this chunk
Processing configuration
HTTP last chunk sent from client to sever
HTTP last chunk sent from client to sever
Netty representation of the last HTTP Chunk
Event fired when a HTTP request has been received
Event fired when a HTTP request has been received
Incoming Netty request for processing
Processing configuration
Encapsulates the all the data sent in a HTTP request; i.e.
Encapsulates the all the data sent in a HTTP request; i.e. headers and content.
Encapsulates all the data to be sent to the client in an HTTP response; i.e.
Encapsulates all the data to be sent to the client in an HTTP response; i.e. headers and content.
Event associated with this response
Port of Netty's HttpResponseStatus class for convenience.
Port of Netty's HttpResponseStatus class for convenience.
HTTP response status code as per RFC 2616.
Immutable and read only collection of HTTP headers
Immutable and read only collection of HTTP headers
Unlike a HashMap, this collection supports multiple entries with the same field name and name matching is performed in a case insensitive manner as per RFC 2616.
Details of the HTTP request that initiated the web socket connection or chunk transfer.
Details of the HTTP request that initiated the web socket connection or chunk transfer.
To save space, the contents is not stored
Mutable collection of HTTP headers
Mutable collection of HTTP headers
Unlike a HashMap, this collection supports multiple entries with the same field name and name matching is performed in a case insensitive manner as per RFC 2616.
Socko Events are fired by Socko and passed to your routes for dispatching to your handlers.
Web Socket configuration used by org.mashupbots.socko.events.WebSocketFrameEvent in processing
Web Socket configuration used by org.mashupbots.socko.events.WebSocketFrameEvent in processing
Name of this instance of the Socko Web Server
Actor to which web log events to be sent
Event fired when a web socket text or binary frame is received.
Event fired when a web socket text or binary frame is received.
A org.mashupbots.socko.events.WebSocketFrameEvent will only be fired after an initial org.mashupbots.socko.events.WebSocketHandshakeEvent has been successfully processed.
The initial HTTP request
Incoming data for processing
Web Socket configuration
Event fired when performing a web socket handshake to upgrade a HTTP connection to a web socket connection.
Event fired when performing a web socket handshake to upgrade a HTTP connection to a web socket connection.
Socko requires this event be processed in your route and NOT passed to actors.
The only action that needs to be taken is to call event.authorize()
.
val routes = Routes({ case event @ Path("/snoop/websocket/") => event match { case event: WebSocketHandshakeEvent => { event.authorize() } case event: WebSocketFrameEvent => { myActorSystem.actorOf(Props[MyWebSocketFrameProcessor], name) ! event } } })
Calling event.authorize()
authorizes Socko to perform all the necessary handshaking. If not called,
Socko will reject the handshake and web sockets processing will be aborted.
event.authorize()
is a security measure to ensure that upgrades to web socket connections is only performed at
explicit routes.
HTTP request associated with the upgrade to web sockets connection
Processing configuration
Standard HTTP response status codes
Companion object
Companion object
Companion object
Companion object
Socko events are raised by Socko and passed into your routes for dispatching to your handlers. Socko events provides a bridge between Netty and Akka.
There are 4 types of org.mashupbots.socko.events.SockoEvent