By Guest on Wednesday, 18 June 2025
Posted in General
Replies 5
Likes 0
Views 1.2K
Votes 0
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
Hello,

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

Kind Regards,
Sergio
·
5 months ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Sergio,

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

Thanks,
Marius
·
5 months ago
·
0 Likes
·
0 Votes
·
0 Comments
·
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
·
5 months ago
·
0 Likes
·
0 Votes
·
0 Comments
·
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
·
5 months ago
·
0 Likes
·
0 Votes
·
0 Comments
·
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
·
5 months ago
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post