Commit f46aa96a by Michael Brachmann

debugging websocket

parent 7cb87811
......@@ -74,8 +74,6 @@ begin
Url := Url + '/';
Url := Url + SERVER_PATH_SEGMENT;
XDataServer1.BaseUrl := Url;
XDataServer1.ModelName := '';
Logger.Log(1, 'StartWsServer: ModelName cleared to empty');
XDataServer1.ModelName := AModelName;
Logger.Log(1, 'StartWsServer: ModelName set to [' + XDataServer1.ModelName + ']');
SparkleHttpSysDispatcher3.Start;
......
......@@ -3,7 +3,8 @@ unit Ws.Service;
interface
uses
XData.Service.Common;
XData.Service.Common,
System.JSON;
const
WS_MODEL = 'Ws';
......@@ -12,7 +13,7 @@ type
[ServiceContract, Model(WS_MODEL)]
IWebSocketService = interface(IInvokable)
['{673FE678-D9EF-468D-89CB-CEF26E8758BC}']
[HttpGet] function WebSockerConnectionHandler: string;
[HttpGet] function WebSockerConnectionHandler: TJSONObject;
end;
implementation
......
......@@ -21,7 +21,7 @@ type
[ServiceImplementation]
TWebSocketService = class(TInterfacedObject, IWebSocketService)
public
function WebSockerConnectionHandler: string;
function WebSockerConnectionHandler: TJSONObject;
private
function Health: string;
procedure ProcessJsonMessage(const AMsg: string);
......@@ -31,7 +31,7 @@ implementation
{ TWebSocketService }
function TWebSocketService.WebSockerConnectionHandler: string;
function TWebSocketService.WebSockerConnectionHandler: TJSONObject;
var
Upgrader: IWebSocketUpgrader;
WebSocket: IWebSocket;
......@@ -39,7 +39,7 @@ var
Msg: IWebSocketMessage;
MsgStr: string;
begin
Result := '';
Result := nil;
Logger.Log(1, 'websocket begin-------');
Upgrader := THttpServerContext.Current.Item<IWebSocketUpgrader>;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment