Anonymous User
  Wednesday, 18 June 2025
  5 Replies
  288 Visits
  Subscribe
Hello

I'm having problems translating this into a working Delphi solution, I tried using TsgcWebSocketClient / TsgcWSAPI_SignalR and TsgcWebSocketClient / TsgcWSAPI_SignalRCore but all i get is a "HTTP/1.1 404 Not Found" while other .Net apps can connect. I'm using the SignalR demo and i'm not sure where to search solution.


private void button1_Click(object sender, EventArgs e)
{
_hubConnection = new HubConnectionBuilder()
.WithUrl("http://localhost:8080", options =>
{
options.SkipNegotiation = true;
options.Transports = Microsoft.AspNetCore.Http.Connections.HttpTransportType.WebSockets;
})
.WithAutomaticReconnect(new RetryPolicy(3))
.Build();

_hubConnection.On("Event1", OnEvent1);

_hubConnection.StartAsync(_cancellationTokenSource.Token);
}

Thanks for any help!

Regards,
Marius
1 month ago
·
#2314
Hello,

If you can provide the .net sample I'll try to help.

Kind Regards,
Sergio
1 month ago
·
#2315
Hello Sergio,

I added a small demo project, event1 is just one example of the possible events

Thanks,
Marius
Attachments (1)
1 month ago
·
#2316
Hello,

Thanks for the sample, but I was asking for the server sample. If you can provide it I'll try to debug in my machine.

Kind Regards,
Sergio
1 month ago
·
#2317
Hello Sergio,

Sorry, my mistake,

I do not have acces to the server code which makes this a rather complicated question for you.
If you have anything I would appreciate any help or tips in this one.


I'm going to ask for server implementation, and might not get it as its "protected" source, mayby some fragments would suffice

Thanks,
Marius
1 month ago
·
#2318
Hello,

I've reviewed your client and it's using the SignalRCore connection, so use the TsgcWSAPI_SignalRCore class. Additionally, the client always uses negotiation (I've added a new property for the next release to skip the negotiation, but the current trial doesn't include this feature), so try using the following properties:


options.SkipNegotiation = false;


Kind Regards,
Sergio
  • Page :
  • 1
There are no replies made for this post yet.
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below.
Supported: gif,jpg,png,jpeg,zip,rar,pdf,pas,dfm,dpr,dproj,dpk
· Insert · Remove
  Upload Files (Maximum 10MB)