Hi,
thank you for your interest. My code is just rudimentary implementation of echo server. The part of code responsible for receiving and sending the echo is here:
do
{
bytesSent = 0;
sPosition = 0;
if((bytesReceived = recv(client, buffer, BUFFER_SIZE, 0)) ==...
Hi,
is there any option to check how big message size is in order to invoke recv() with the proper buflen parameter?
I tried the option to put recv in while loop with fixed buflen, tmp buffer and reallocated the proper buffer, however, it didn't work as I intended.
Any help will be appreciated.
That is really good idea, however, what to do if those defines comes from some include files that cannot be changed. Of course I can perform mapping of those defines
#include fileWithDefines.h
map["1ST_OPTION"] = 1ST_OPTION;
and I believe it would be much improve but maybe there is another...
Hi, I have the following problem
#define FIRST_OPTION 1
#define SECOND_OPTION 2
#define THIRD_OPTION 3
#define FOURTH_OPTION 4
…
Then I have some STL input string, let’s say inpStr and do sth like that
if (inpStr == "FIRST_OPTION")
importantVariable = FIRST_OPTION;
else if (inpStr ==...
I have to write a calculator which will be able to calculate expressions similar to ((2+4)*4)/((3+2)-(5*5)) so I need a parser to parse such thing and compute the result. My question is as follows. Is there any built-in class which is able to parse such expression or do I have to use regular...
Hi, I am the very beginner in network programming and need to find a way to show all IP addresses being in the same network. I considered solution of getting machine's IP and subnet mask and perform some bit operations. I've already found the code to get the IP address of the local machine...
Thank you very much for the link but could you specify where I can find the way to disable those system shortcuts, since after skimming the text I didn't find such information
Is there any possibility to turn off system shortcuts while running swing application. What I mean is that for instance having accelerator set for "ctrl presssed C" shortcut is recognized as a copy operation, not as a call for an action listener. Unfortunately I cannot avoid having accelerators...
Hi,
what I am trying to do i to split an expression like 1+2+3 and use + as delimiter. The problem is that I cannot do it neither using
String s = new String("1+2+3");
s.split("+");
nor
Scanner s = new Scanner("1+2+3");
s.useDelimiter("+");
What I've read is that + cannot be used as a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.