PDA

Click to See Complete Forum and Search --> : Qs: Reject(Deny) reciv. data from WinSck


Yoosha
Jun 5th, 2007, 05:29 AM
Hi,
how can i reject(Deny) received data from socket?
Ex.:

Private Sub WinSck1_DataArrival(ByVal bytesTotal As Long)
WinSck1.GetData Dim_Data, vbString

If bytesTotal > "300" Then
REJECT(Deny) DATA ' How to do this?
End If

Very thanks ;)

DigiRev
Jun 5th, 2007, 05:34 AM
As long as the socket is connected, data will be received and put into the Winsock buffer. You don't have to do anything with it though, just ignore it...

alkatran
Jun 9th, 2007, 11:02 AM
DigiRev is right, you will always need to 'accept' the data. In fact, it's already been 'accepted' by the time you get the data received event. If you want to ignore data, all you can do is take it out of the buffer and not use it.