Call to start server is called twice, instead of set Active := True and call Start method, set only Active := True.
procedure TServer.Start;
begin
Writeln('Servidor de Websocket ligado na porta 5000...');
fServer := TsgcWebSocketServer.Create(nil);
try
fServer.Port := 5000;
fServer.OnMessage := DoMessage;
fServer.OnConnect := DoConnection;
fServer.Active := True;
// fServer.Start; <-- commented this line
while fServer.Active do
begin
Sleep(10);
end;
finally
fServer.Free;
end;
end;
No, there are no restrictions more than can run for a limited time.
This is a false positive, my antivirus doesn't detect nothing, from time to time I get false positives, don't worry about it.
I will install community and try to reproduce but I never hear something like this.
Your executable example works well here.
Any restrictions for the version being the evaluation version? We are doing tests to acquire it.
My executable example has a different size than yours. Why?
My: 9,67MB
Your: 2,57MB
Attention:
My antivirus has detected a trojan in its executable. Sorry, the print is in Portuguese.
Yes sorry, my mistake, I sent you another code update, did you try? The problem is that when is a console application Notifyevents property must be neNoSync, this is done automatically on source version but not trial.
Kind Regards,
Sergio
My version is 4.3.5 TRIAL.
Which sgcWebSockets version do you use? seems is not latest.
If it's not latest trial, download latest, and try again.
I'm actually running into the same issue. I'm trying to use a DataModule to contain my components to spare the time of manually creating them. It seems to actually connect however the api events are not firing.
I have attached my project below. I have attempted to change all the Notify Events however it doesn't do anything.
I'm changing the Notify event at design time. I have cycled through all of them to test it.
I think you experience the same problem that Marcelo, set TsgcWebSocketClient.NotifyEvents := neNoSync and will work, at least works here.
I attach a screenshot:
Sergio
I'm actually running into the same issue. I'm trying to use a DataModule to contain my components to spare the time of manually creating them. It seems to actually connect however the api events are not firing.
I have attached my project below. I have attempted to change all the Notify Events however it doesn't do anything.
I'm changing the Notify event at design time. I have cycled through all of them to test it.