473,387 Members | 3,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

receive buffer for TCP socket

91
Hi,

My application is communicate with a network device by transmit and receive string on network. I had a problem, after received 20 or 30 string, it looks like the receive buffer always contains the previous string, new coming string just appended to the receive buffer. is there any way to clear the buffer? I'm using winsock.getdada(String) upon receive data. Thanks
Jun 21 '08 #1
1 1939
Plater
7,872 Expert 4TB
I am going to start moving your posts to VB6, since you always ask about VB objects and not .NET objects.

MODERATOR

Although I would think there is a flag that removes the data as it reads it, instead of performing a PEEK.
Jun 23 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: ?lafur Helgi R?gnvaldsson | last post by:
I'm building a server application which accepts socket connections and I ran into some problems. The socket is asynchronous and therefore uses the BeginXXX and EndXXX methods in the Socket class...
1
by: EppO | last post by:
I wrote a small server/client app. I created a class for my customized socket object using (synchronous) Sockets functions for both server and client use. When client connects to server, if It...
2
by: Craig | last post by:
Hi I listen on a port, when data is received I raise an event (OnMessageReceived) in the while loop as follows: private void WaitForConnection() { TcpListener listener = new...
1
by: Saso Zagoranski | last post by:
Hi! I have simple client/server game that uses sockets to transfer different messages. The server and the client are running on the same machine.
0
by: segue | last post by:
Thanks for reading this, suggestions appreciated. I keep getting an error at Sck.ReceiveMessageFrom. I'm trying to not use the udpclient. I'm mostly concerned with this part of the error: or...
2
by: Daniel Lindberg | last post by:
Hi, im a beginner in C# and i just cant seem to get my udp broadcasting to work. What happens is that it just locks down on the Receive call and never gets any data. I have the code for the server...
5
by: Mahesh | last post by:
Hi am trying to receives UDP pockets , but it is blocking in the "Socket.Receive" can any one help me to find the problem...? byte buffer = new byte; Socket socket = new...
0
by: =?Utf-8?B?UmFqbmk=?= | last post by:
Dear William Stacey, I have written a server code using the Windows Socket API's. Wherein I have created the socket and bound it to a particular IP address and port number. Later I have made the...
2
by: OBones | last post by:
Hi all, I'm currently trying to receive replies to a UDP broadcast that I sent and I can't get it to work. I know the datagrams are sent as I see them with WireShark, but my C# code does not see...
4
by: danomano | last post by:
The code below works fine. As of now I just set the buffer length real big and all is good. However, I hate the impreciseness of that. So my question in general is how do I know what length to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.