Announcement

Collapse
No announcement yet.

rare events in TCP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Guest's Avatar
    Guest replied
    Hello Scott!


    The reason I ask the above question was because in the PBDLL help file it says TCP does not reassemble fragmented packets. But acording to what you have said I shouldn't worry about that? As far as I know I have never not recieved a complete packet but I just want to make sure.

    ------------------
    Cheers

    Leave a comment:


  • Scott Turchin
    replied
    Technically you are at an application layer and the stack that fragments the packets is below you on the OSI model.


    So technically if you are not getting your data completely then hmmmmm


    See, TCP/IP Is byte oriented, the TCP/IP Stack (protocol on the machine) handles the fragmentation by verifying all bytes were received.

    If all bytes were not received it's below your application layer and there's something else wrong either with the stack or the code itself.

    Offhand it looks like you are not receiving it all based on the code, any GPF's occuring????

    Try doing something like this:

    Code:
      If Not Eof(hTcp) Then
         Tcp Line hTCP, Buffer
      End If
    ------------------
    Scott
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Guest's Avatar
    Guest started a topic rare events in TCP

    rare events in TCP

    Hello,


    Could somebody clear this up for me. If a TCP packet becomes fragmented into two packets, does winsock give two notification messages? or is this somthing I should worry about? The reason I am asking is that I am trying to send a structure through TCP and I dont have any way of checking that I recieved the whole thing. I have also tried the loop below but it seems to have some problems.

    I would also like to know what is the biggest string I can use with TCP SEND when the baud rate of your modile phone is only 2400. I suspect it would be araound 200 to 300.

    Code:
    type CRecord
        Well    as long
        Summary as string * 256
    end type
    
    Packet = ""
    Buffer = ""
    
    do
        tcp recv hClient,len(Record),Buffer
        if err then msgbox str$(errclear):end
        Packet = Packet & Buffer
    loop len(Buffer)
    
    lset Record = Packet
    ------------------
    Cheers
Working...
X