pure032398
asked on
Winsock packetsize problems
Morning all.
I've stumbled across a HUGE problem with my application.
I'm using winsock to send and recieve (works 100% fine).
When i RECEIVE some XML data, it arrives in 2 packets, becuase the XML DATA is too big for one packet!! I read some previous posts, etc, and found that packet size is around 8192 or something.
PROBLEM
^^^^^^
How do i make it so that strData == winsock.getdata from BOTH packets?! Also, my data can also get VERY LONG! so i can't hardcode the actual number of packets being received.
the main thing i cannot understand is how it KNOWS when a group of packets are part of a broken up string of data... ?
eg..
Private Sub Winsock_DataArrival(ByVal bytesTotal As Long)
Dim strIncomingText As String
' The incoming data is to data from ALL THE PACKETS..
Winsock.GetData strIncomingText
End Sub
??
This is so confussing.
Please help :(
-PK-
I've stumbled across a HUGE problem with my application.
I'm using winsock to send and recieve (works 100% fine).
When i RECEIVE some XML data, it arrives in 2 packets, becuase the XML DATA is too big for one packet!! I read some previous posts, etc, and found that packet size is around 8192 or something.
PROBLEM
^^^^^^
How do i make it so that strData == winsock.getdata from BOTH packets?! Also, my data can also get VERY LONG! so i can't hardcode the actual number of packets being received.
the main thing i cannot understand is how it KNOWS when a group of packets are part of a broken up string of data... ?
eg..
Private Sub Winsock_DataArrival(ByVal bytesTotal As Long)
Dim strIncomingText As String
' The incoming data is to data from ALL THE PACKETS..
Winsock.GetData strIncomingText
End Sub
??
This is so confussing.
Please help :(
-PK-
ASKER
--> append the packets together ???
--> parse on some characters ???
i sorta understand what u mean .. but examples???
-PK-
--> parse on some characters ???
i sorta understand what u mean .. but examples???
-PK-
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No acceptable answers :(
I've already figured it out.
I've already figured it out.
Hello Pure.
Would you mind sharing what you did to get rid of this problem ?
I hope you didn't take any parsing approach.
Would you mind sharing what you did to get rid of this problem ?
I hope you didn't take any parsing approach.
Hi pure,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:
Accept BrianGEFF719's comment(s) as an answer.
pure, if you think your question was not answered at all or if you need help, you can simply post a new comment here. Community Support moderators will follow up.
EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:
Accept BrianGEFF719's comment(s) as an answer.
pure, if you think your question was not answered at all or if you need help, you can simply post a new comment here. Community Support moderators will follow up.
EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
Comment from expert accepted as answer
Computer101
E-E Moderator
Computer101
E-E Moderator
Good Luck
Paul