when I wrote server for game I got problem:
SignalR hub (with MessagePack) removes connection ID and then disconnects client.
Any Timeout options (in .AddSignalR) & Nginx headers doesn't help.
Related
My requirement is if a browser sends the request to ServerBootStrap then the ServerBootStrap creates BootStrap (Client) and that client connects with a proxy server.
The problem here is to connect with Proxy Server we need to send first HTTP CONNECT method to open a tunnel from Proxy and BootStrap (Client) and then whatever request comes from Browser to Server, the server will send BootStrap(client) and all the communication should happen.
This will look like
Browser ->ServerBootStrap(Server)->BootStrap(Client)->ProxyServer(HTTP2)
Can somebody tell me how do I implement this for Http2?
How do I send Http CONNECT from a Handler for the First time while Client instantiating and If CONNECT gets 200OK from Proxy Server I will to remove Handler from channel pipeline?
Can we explicitly call any HTTP CONNECT request while adding a handler in Pipeline and getting the response to check the status?
--Can somebody answer ?
I am using camel to build a tcp server. I am waiting for connections and responding to clients messages using the following route
<camel:route id="ServerListeningRoute">
<camel:from ref="tcpServerEndPoint" />
<camel:setBody>
<camel:simple>Server Received from you: ${body}</camel:simple>
</camel:setBody>
</camel:route>
It is working. I can connect to the server with telnet, sent a message and get back the response from the server.
Now i want to create a new route to send messages from my server to those connected clients but reusing the socket connection already established. I am not responding to a message previously sent by a client. These would be new Exchanges started from my server.
I have tried this
<camel:route id="ServerSendingRoute">
<camel:from uri="timer://foo?fixedRate=true&period=60s?amp;delay=25s" />
<camel:setBody>
<camel:simple>This is a message from the server</camel:simple>
</camel:setBody>
<camel:to ref="tcpServerEndPoint" />
</camel:route>
But it is not working. The server is receiving its own produced messages since the to endpoint is opening a client connection to the server.
Is it possible with Netty and Camel to reuse the established connection? Do i need to extent the netty component somehow? Any workaround you can think of?
The problem is this:
I decided to make a messenger/chat (VCL application) with callback on DataSnap technology (IDE Delphi XE6), has created a simple DataSnap server (tcp / ip + http) without the database, and thick client.
All works fine if the whole thing run on a local network (tcp / ip) or via the Internet (http).Problems arise when run over HTTP and the client machine has a HTTP proxy server, the client application can not connect to my DataSnap server application. Client application gets error "10061 connection refused"
or "Expected datasnap context in request http://[YourServerIP]:[YourPort]/datasnap/tunnel".
I tried to enter IP and port of the proxy server to params of component TSQLConnection.Driver params DSProxyHost and DSProxyPort, turned off my firewall and antivirus software, checked allows traffic to the proxy ip + port, but the problem has not disappeared.
After few days searches, without results, i decided listening requests from client application and response of my DataSnap Server application in HTTPTrace procedure of DSHTTPService1 component, also with software HTTPDebugerPro, and i noticed interesting thing:
when client app connecting to ds server app without proxy server, in request ds server app receive URI with this text "/datasnap/tunnel" and all works fine ds server response "200, OK".
when client app connecting to ds server app with proxy, in request ds server app receive URI with text "http://[YourServerIP]:[YourPort]/datasnap/tunnel" and raised exception with response error "404, Expected datasnap context in request http://YourServerIP:YourPort/datasnap/tunnel".
Has anyone knows solution about this problem? How to connect DataSnap client to DataSnap server via proxy server? I searched solution for this problem several days, I shoveled the Internet but have not yet found a solution.
I am new to SignalR and I have a question on SignalR communication when we introduce a load balancer.
Lets assume we want to execute a void method on server side which receives some data as a parameter from client. Server takes that data and processes further. Lets say after processing for a while, it identifies that it has to send the notification back to client.
Case 1(Between client and server): Client calls void method on server side(Hub) by passing some data. Connection gets disconnected. Server processes the client data further. When it identifies that it has to push the notification back to client, it recreates the connection and pushes back the data to client.
Case 2(Between client and server with load balancer in between): How does the above scenario(Case 1) work here?. When server sends the push notification back to load balancer after processing client data, how does it know to which client it has to send the notification back?
You should read the scaleout docs. Short version: messages get sent to all servers, so if the client reconnects (it's not the server that establishes the connection!) before the connection times out , it will get the message.
Quote from the docs:
The cursor mechanism works even if a client is routed to a different
server on reconnect. The backplane is aware of all the servers, and it
doesn’t matter which server a client connects to.
I want to know few basic things about connection establishment between client and server.
suppose my web page has left menu where i have some links, on click of those child pages
are open in the right side of master page .Now each link is requesting a new web page to
the server. Each web page is calling 5-6 web services asynchronously to get the data. So
if i am clicking on a left menu link, a connection is established between client and
server using (client IP and Port) to (server Ip and port). But before the response comes,
suppose i clicked on other link of menu then how server knows that old conneciton is
terminated and new connection is established.next thing,when i clicked on a link, request
goes to server, server process the request but before sending the response if connection
is terminated from client side, what happens to that response, does server discards the
response and takes the new request for process.
actually i have lot of confusion, so if anyone can explain me the full client-server round trip process,that will really very helpful .
Thanks in advance
Server will discard the response and will work in subsequent requests. Reading about Hypertext Transfer Protocol will make you understand more. You can search on internet one of article is here
The request and response is made over TCP which is connection oriented protocol as the connection breaks IIS will know that client if not accessible. You try http://www.google.com.pk:80 will take you to http://www.google.com.pk as we can omit default port i.e. 80. Try this http://www.google.com.pk:82/ it will not open www.google.com as tcp connection could not be made on port 82.