Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
buffer problem in c++ sockets
Name: Wadhera G Date: April 22, 2003 at 22:33:46 Pacific OS: Linux RHL 8.0 CPU/Ram: P III 450 , 128 MB
Comment:
Hi,
I am implementing an information sharing system with messaging as the method. I have a number of client/servers on the same machine.
for the client my sequence is socket() bind() /* not necessary though */ connect() send() recv() /* repsonse */
the server is socket() listen() while(true) { accept() recv() send() /* response */ }
data from one response buffer is coming in the other response buffers even after making sure that before every client-server interaction i free the buffers and reallocate them.
Name: Don Arnett Date: April 23, 2003 at 08:28:03 Pacific
Reply:
Need more input...
Please show how you are declaring the buffers and the parameters that you pass to recv()
0
Response Number 2
Name: Wadhera G Date: April 23, 2003 at 22:30:55 Pacific
Reply:
Hi,
thanx for the response
the problem still remains that buffers from one client server pair still overlap with others.
Anywayz I have worked around the problem by taking the number of bytes recv'd and copy those many bytes to a string and forget about the rest which still contains data from other client server pairs.
Summary: "Do you know how to cause an overflow?" There are lots of simple examples on the Internet. The most famous one is from "Smashing the Stack for Fun and Profit". You should read that tutorial. You ca...
Summary: hi all, can any body solve this problem, using c as the programming language.Really urjent... 1.->Your program should: Create a binary tree structure. Create routines for loading the tree appropriate...
Summary: Im writing an application in C++ MFC that involves the CSocket class. My program works fine but when I use the CSocket::Accept function the program hangs untill it has received a connection from the ...