Oops!! sorry I gave you the return code '0' which means success. yes, there is a return confirmation which I am getting. But I am not selecting the entire return confirmation, just taking in first 40 bytes. Thanks, John
John Bosko
Posts
-
Socket Program Problem!!! -
Socket Program Problem!!!Hi, How do I empty the socket buffer? If you can help me out with it, I guess it would solve my problem!!! Kindly Help, John
-
Socket Program Problem!!!Hi, yes the return variable is '0' which is correct. Thanks, John
-
Socket Program Problem!!!Hi, I am doing a very basic thing of sending data to a server and getting the reply back. For which first I have to send in a Login request and get authenticated, once authenticated, I have to send the actual data. The problem I am facing is when I send the data, it embeds some funny characters before the actual text, which is causing the problem. Upon further investigation, it was found that if I send the data without the login, it gets to the server correctly. Is there some kind of REFRESH!!! for the second time when the data is sent so that it has correct values? [CODE] ========================================= for login authentication: e = sendto(sd,"8888\n",89,0,(struct sockaddr *)&saServer,sizeof(saServer)); For sending Data: e = sendto(sd,"888808M5359846Test+Value\n"); ========================================== [CODE] The second sendto, does not send the data correctly. Is there some refresh after we do the first sendto? Kindly Help!!! Best Regards, John:((
-
Non Printing CharactersHi Dominik and Jh, Just out of curiosity, can we do something like concatenating 2 strings? Something like this in sendto()? ======================== e = sendto(sd,"string1"+"string2",lenght(),0,(struct sockaddr *)&saServer,sizeof(saServer)); ======================== Many Thanks, John
-
Non Printing CharactersHi Dominik and Jh, Yes, your suggestions worked out. Apparently the problem still persists and I've got no clue why its happening.. What I am doing is just sending in some data to another server using a sendto(). The server program is written in Java. But when I send it, the server gets it with some non-printing character (ASCII '0') in the begining and it's causing a problem. Any suggestions, what could be going wrong? Here's the sendto() code [CODE] ======================================== e = sendto(sd,final.c_str(),final.length(),0,(struct sockaddr *)&saServer,sizeof(saServer)); ======================================== [CODE] Many Thanks, John:((
-
Non Printing CharactersHi Domnik, I did that and its not removed the second character. What comes towards the end is 10 and 0. When I do a for(i=0;i
-
Non Printing Characters:((Hi, I've got a code which is adding 2 non-printable characters at the end of the string, which is causing a lot of problem. Can anyone help me in removing these 2 "funny" characters. Here is the code [CODE] ======================================== #include #include #include #include #include using std::string; const char *yy; int u,i; string final = "888808M5359846\n"; void main() { final.append("02/10/2002 14:30:10\n"); yy=final.c_str(); u=strlen(yy); for(i=0;i<=u;i++) { printf("%c %d\n",yy[i],yy[i]); } } =========================================== [CODE] Kindly help!! Many Thanks, John
-
missing "eh.h" file!!!Thanks Joaquin!! It gave me a bright Idea!!! Best Regards, John.:-D
-
missing "eh.h" file!!!:((Hi, When I try to compile a program I get a following fatal error =========================================== fatal error C1189: #error : "eh.h is only for C++!" Error executing cl.exe. =========================================== I'm using VC 6. Please can someone tell me where do I get the right eh.h for VC? It's very critical!!! Many Thanks, John Bosco.
-
UrlEscape ErrorHi, with regard to UrlEscape function, why do I get "'UrlEscape' : undeclared identifier" when I compile? I do have the required version of "Shlwapi.dll". I am running on Win2000. Kindly Help. Thanks, John.
-
UrlEscape()Hi Rohit, Apparently i am also using the same function. However I get a different error which says "too many initializers". Please can you give an example of how to use this function. Would be very greatful to you. Thanks, John
-
Code Crash!!!Hi, I've written a code which replaces characters in a string with their respective URLEncode (i.e a " " will be replaced by "+" etc..). However the code crashes at execution. Please help!! Here's the code extract; Code: >----------------------------------------------------------------------------- for(j=0;j
-
URLEncoderHi, I've written a code which replaces characters in a string with their respective URLEncode (i.e a " " will be replaced by "+" etc..). However the code crashes at execution. Please help!! Here's the code extract; Code: ------------------------------------------------------------------------------ for(j=0;j
-
URLEncoderHi, What's the equivalent of JAVA's "URLEncoder.encode" in VC++? or is there an alternate way of encoding to be compatable with Java's "URLDecoder.decode"? Many Thanks, John:confused:
-
String ErrorHi, In the below code I've copied the value of a string variable into "store" (which is Char(50). When I print the value of store, it crashes!!! please can someone tell me how to store from string to char and print the value of char!! thanks, John:confused: Code: ====================================================================== strcpy(store,ret.c_str()); printf("%s",store); ======================================================================
-
URL EncoderYes, I need something like escape in java!!! Please can you help me out with it, I am pretty newbie in C++. Thanks Dominik, John
-
URL EncoderEncode would imply parsing a string with values. ex. if the string was www.yahoo.com before encryption, after encryption it would be something like www&&yahoo^com. the characters would be replaced.
-
URL EncoderHi Dominik, Apparently I want to encode a string in C++ and then store the same in a char field. Thanks, John
-
URL EncoderHi, Please can someone tell me, where do I get the URL Encoder for C++.:( Many Thanks, John