I am doing this sample https://msdn.microsoft.com/en-us/library/windows/desktop/ms737889(v=vs.85).aspx that contains a C++ tutorial for client and server with Winsock. To run this the server must be run before the client, obviously, but how to debug these things. I mean when I start the server and put a breakpoint in the main function it executes, but when I do this in the client I want to see the interraction with the server code from its solution. Im confused. Is there an article describing this?
Related
I'm having a GRPC service written in Go that wraps a C++ library.
Now, once in a while, the server hangs on a grpcurl based client call, while it succeeds at other times in sending out a response.
I have tried exporting the grpc traces variable and setting the verbosity to DEBUG, but they didn't seem to help.
I am following the ListFeatures() example in this tutorial: https://github.com/grpc/grpc/blob/v1.31.0/examples/cpp/route_guide/route_guide_client.cc
My server is in Java and my client application is in c++.
I have both the server and the client running locally. What I am observing is that my application crashes when I try to read the stream response via `reader->Read(&feature). I can verify that the server receives the api call and is sending responses back. I am also able to successfully hit the server from bloomRPC.
Any ideas why I can't receive responses in my c++ client application?
Much appreciated!
I had this problem when the context used to create the ClientReader fell out of scope. The context needs to be persistent while the ClientReader is in use.
I need to execute some code on server side when some conditions on client side are met. What is the best way to do that? Is it possible to run .exe file from client program, or can I make some kind of listener on special port, which will run my executables when call is on? Client and server running under Windows both.
For the development of my own sonar plugin i want to be able to debug.
after quite a while I found out how to run the sonarqube server in debug mode. Therefore I followed the instruction of the following website. enter link description here
When I started the server in debug modus an connect eclipse by using the debug configuration, the server starts but it do not not stop at the breakpoints that I have been set. I have set breakpoints to extension point (classes) like the one which extends the SonarPlugin class or the one which extends the RuleRepository class. The logs of these classes are part of the server log file, so I'm pretty sure that this classes are executed. Nevertheless it doesn't stop at the breakpoints.
Anyone ideas whats the problem?
The server runs as three process - a parent application, the web server and a search server. Plugins are loaded into the web server so you need to start this with debug arguments. The options for this seem to have changed and are not yet reflected in the documentation. To debug the web server put:
sonar.web.javaAdditionalOpts=-agentlib:jdwp=transport=dt_socket,suspend=y,server=y,address=9001
into your sonar.peroperties file and start sonar using the StartSonar script. This will launch all three applications, but with the web server suspended. Attach your debugger to port 9001 and you should find your plugin main class and rules definition breakpoints are hit.
I made a simple program in c++ for connecting to a site and loading a page HTML code or send data using GET/POST requests.
But now I want the program to connect and send/receive data through proxy.
You probably know software like NextVpn and proxifier. when they are running any application which tries to communicate through internet will have to go through these apps.
The problem is that my program connects and communicates directly and my proxy software doesn't interfere.
Communication is done by the socket programming routins (SOCKET class) like this
SOCKET sck=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
connect(sck,(SOCKADDR*)(&SockAddr),sizeof(SockAddr));
send(sck,myRequest,strlen(myRequest),0);
Any solution?
EDIT: The problem was from NextVPN not the Proxifier itself. It seems that NextVPN lacks functionality in hooking into some programs. First NextVPN finds the program which is trying to connect to a remote address then redirects it to its portable version of proxifier with something named "compose.ns" . Unfortunately it was unable or couldn't detect my app connecting to internet. Instead I used Proxifier itself and it successfully detected my app as it was showing in its connection list.