I have a working example of websockets and I have this weird issue whereby if I connect a client to the server directly, bidirectional communication is working perfectly, the client can initiate the communication with the server and the server can send messages to the client,
when I use the Gateway with outbound url my websocket server, I can see that the client can connect to the socket via the gateway and can send as many messages that I want and they get processed by the policy as they should, but if I try the other way, then the server tells me that the client disconnected but on the client, I can see that I am still connected and if I send another message across then the server will register the connection of the client again,
I have the same policy for the inbound and outbound settings,
I have the correct url in the outbound settings
there is no ssl or authentication involved at all
The ssg logs record nothing, I have set an empty service (with a simple logging to distinguish which is called and if they are called) for both outbound and inbound and I noticed that the inbound service is used when the client sends the request and the outbound policy is used on the one from the server.
I also put a message received global policy that captures the request to check what is passed and I noticed that if the server talks back with an empty message, the message is passed on, but if they server sends even a letter, the outbound service is not called at all and the message received policy is not triggered! but if the payload of the server is empty, then the global is triggered and the communication is passed on,