buildHandshake method
Builds the handshake BC object
@api private
Implementation
Map buildHandshake(query) {
final buildQuery = () {
var requestQuery = request.uri.queryParameters;
//if socket-specific query exist, replace query strings in requestQuery
return query != null
? (Map.from(query)..addAll(requestQuery))
: requestQuery;
};
return {
'headers': request.headers,
'time': DateTime.now().toString(),
'address': conn.remoteAddress,
'xdomain': request.headers.value('origin') != null,
// TODO 'secure': ! !this.request.connectionInfo.encrypted,
'issued': DateTime.now().millisecondsSinceEpoch,
'url': request.uri.path,
'query': buildQuery()
};
}