Permalink
Browse files

Changed the order of arguments to EwgiServer:stream_process_end/2.

  • Loading branch information...
1 parent 0f87262 commit 2e74b87b6d107ef86bc0b76678d97584786b9598 @davide davide committed Nov 4, 2009
Showing with 15 additions and 13 deletions.
  1. +1 −1 src/ewgi_api.erl
  2. +14 −12 src/server_gateways/ewgi_yaws.erl
View
@@ -888,4 +888,4 @@ stream_process_deliver_final_chunk({ServerModule, _ServerPid, Socket}, IoList) -
ServerModule:stream_process_deliver_final_chunk(Socket, IoList).
stream_process_end({ServerModule, ServerPid, Socket}) ->
- ServerModule:stream_process_end(ServerPid, Socket).
+ ServerModule:stream_process_end(Socket, ServerPid).
@@ -39,18 +39,6 @@
-define(INTERNAL_ERROR, [{status, 500}, {content, "text/plain", <<"Internal Server Error">>}]).
-define(BAD_REQUEST, [{status, 400}, {content, "text/plain", <<"Bad Request">>}]).
-stream_process_deliver(Socket, IoList) ->
- yaws_api:stream_process_deliver(Socket, IoList).
-
-stream_process_deliver_chunk(Socket, IoList) ->
- yaws_api:stream_process_deliver_chunk(Socket, IoList).
-
-stream_process_deliver_final_chunk(Socket, IoList) ->
- yaws_api:stream_process_deliver_final_chunk(Socket, IoList).
-
-stream_process_end(YawsPid, Socket) ->
- yaws_api:stream_process_end(Socket, YawsPid).
-
%%====================================================================
%% ewgi_server callbacks
%%====================================================================
@@ -129,6 +117,20 @@ handle_stream(Generator, YawsPid) ->
error_logger:error_report(io_lib:format("Invalid stream generator: ~p~n", [Generator])),
yaws_api:stream_chunk_end(YawsPid).
+%%--------------------------------------------------------------------
+%% Push Streams API
+%%--------------------------------------------------------------------
+stream_process_deliver(Socket, IoList) ->
+ yaws_api:stream_process_deliver(Socket, IoList).
+
+stream_process_deliver_chunk(Socket, IoList) ->
+ yaws_api:stream_process_deliver_chunk(Socket, IoList).
+
+stream_process_deliver_final_chunk(Socket, IoList) ->
+ yaws_api:stream_process_deliver_final_chunk(Socket, IoList).
+
+stream_process_end(Socket, ServerPid) ->
+ yaws_api:stream_process_end(Socket, ServerPid).
%%--------------------------------------------------------------------
%%% Internal functions

0 comments on commit 2e74b87

Please sign in to comment.