Actually problem is not so simple, our client is in VB where we declare on string type variable and we are appending the structure in the vairbel e.g. 10 times then send the data.This dat may vary between 76 to 83 bytes. On client side we delared the a buffer of 512 byte, which is already declared in the orginal code,the data which are coming from client side is accumulating in the buffer before we read it from it. So what we did for this problem we just filled rest of the space of buffer with some extra character and on receiver side we are taking correct data upto that extra character.But one new problem we are facing in this approach that sometimes data is coming between extra character like correct data format 8172646124975975570950098908********************************************** unwanted/corrupted data ************************45667********************************************* so i am not able to understand why this data coming in between the extra character. Thanx Lalit Aggarwal
laggraw
Posts
-
socket programming -
socket programmingActually my client in VB, there we declared a string variable and we are appending data into that and after that we are sending data to the server which is in simple C language, where we declare a 512 byte buffer to collect the data.Data is of variable size vary between 76 to 83 byte. Actually code is already written we just modifying it, perviously we are using this program on same host, but now our customer want to use this program on different host, so actually becoz buffer was very large so data is accumulating in the buffer before reading so we got some accumulated data and some corrupt data also. Now what we did we just filling rest of the space of buffer by'*'(on client side) and taking the correct data on server side upto 1st '*' is encounter. But in this approach we are facing one more problem we faced that some times data is correct some time some bytes of data is coming between '*' like correct data: 115237887261448874974239***************************************************** uncorrect data: ********************************78798**************************************** i am not able to understand why these byte coming in between '*'. Sorry sir our code is simple on like any other simple program, but i cant share u may code. thanks Lalit Aggarwal
-
socket programmingHello friends, 1.I am facing one small problem in socket programming, my client is in c (visual studio)and client is in VB.when i am sending data from client it is sending 81 byte string (correct data)on reciever end some unwanted data(ìÿ¼³W|l) it is also appending in the correct data. 2.One more problem is that because client is sending at the fast rate data is accumulated on reciever end if the buffer size is greater(e.g.260) then correct data size(81) and after 3-4 string of correct data that unwanted data (ìÿ¼³W|l)is appending at the end. If anyone have any solution to this problem plz suggest me the solution Lalit Aggarwal