SCTP Discussions

Text archives Help


Re: [SCTP-Discussion] sctp_send delay on windows


Chronological Thread 
  • From: "elie" <elie AT flashmail.com>
  • To: Michael Tuexen <Michael.Tuexen AT micmac.franken.de>, elie AT flashmail.com
  • Cc: sctp-discussion AT sctp.de
  • Subject: Re: [SCTP-Discussion] sctp_send delay on windows
  • Date: Thu, 28 Feb 2008 19:08:23 +0800
  • List-archive: <http://lists.franken.de/pipermail/sctp-discussion>
  • List-id: SCTP Discussions <sctp-discussion.sctp.de>

Thanks you very much for your response, I will update the
code as you explained,

Elie.

>Hi Elie,
>
>comments in-line.
>
>Best regards
>Michael
>
>On Feb 28, 2008, at 7:07 AM, elie wrote:
>> Michael,
>> The capture is here:
>>
>> http://download.yousendit.com/BDC67D557E5A65EC
>>
>> The client is 10.4.2.23 and the server is 10.4.2.65. The
>> client is starting to send data (164 packets using
>> sctp_send), than waits 10 seconds, than initiates a
>> graceful close (e.g. calls sctp_shutdown, than
>unregisterinstance). OK. It looks like the client does a
>for(i=0; i<164; i++)
> sctp_send();
>sleep(10)
>sctp_shutdown();
>The problem is that you do not give back control to the
>sctplib and therefore the sctplib can not process the
>incoming SACKs. The control should be in the event loop
>>hander almost all the time.
>>
>> Only 27 packets are initially sent, although sctp_send
>> succeeds. Only after calling sctp_shutdown you see the
>rest I guess it stops sending because it is not processing
>the SACKs and the reveiver window is full.
>>
>> of the data capture arrives. It seems the sctp_shutdown
>> is sending the rest of the packets (and not
>> unregisterinstance as I previously written, I was wrong.
>> I'm calling the shutdown & unregister one after the other
>> , but as I've inspected it when using sctp_abort and not
>> shutdown, the rest of the packets are not sent, so it
>> seems to be related to the close).
>>
>> Here's a code snippet:
>>
>> Server
>> for (;;)
>> {
>> isdatarrived() (if so copy it and return)
>> sctp_extendedEventLoop(sa_mainm->mainlock
>> ,sa_mainm->mainunlock ,NULL);
>> }
>>
>> Client
>>
>The question is: How do you call sctpsendmsg().
>> int sctpsendmsg(const char *buf , int len)
>> {
>> r = SCTP_send(association,
>> 0,
>> (unsigned char *)buf,
>> len,
>> SCTP_GENERIC_PAYLOAD_PROTOCOL_ID,
>> SCTP_USE_PRIMARY,
>> SCTP_NO_CONTEXT,
>> 0xFFFFFFFF, // infinite
>> SCTP_UNORDERED_DELIVERY,
>> SCTP_BUNDLING_DISABLED);
>>
>> // return values
>> if (r==SCTP_SUCCESS)
>> {
>> return len;
>> }
>> else
>> {
>> return SOCKETERROR;
>> }
>> }
>>
>>
>>
>>
>> thanks,
>> Elie
>>
>>
>>> Hi Elie,
>>>
>>> can you provide a Wireshark trace in .pcap format and
>>> possibly the source of your programs?
>>>
>>> Best regards
>>> Michael
>>>
>>> On Feb 27, 2008, at 12:28 PM, elie wrote:
>>>> Hi,
>>>> I'm new to SCTP lib, using it on windows XP. I've
>>>> written a small server & client programs where the
>>>> client sends packets to the server.
>>>>
>>>> There's a problem when the client sends sum of packets
>>>> (200~, each 100~ bytes), using sctp_send. I see the
>>>> first 30~ being sent, than there's a delay on the
>>>> sender side - although the sctp_send function returns
>>>> without an error, the packets are not sent. Only when I
>>>> call unregisterInstance on the sender side the rest of
>>>> the packets are being sent.
>>>>
>>>> Can someone please help me understanding this issue?
>>>> thanks-
>>>> Elie
>>>>
>>>>
>>>> _______________________________________________
>>>> sctp-discussion mailing list
>>>> sctp-discussion AT sctp.de
>>>> http://www.sctp.de/mailman/listinfo/sctp-discussion
>>>>
>>>
>>
>>
>>
>






Archive powered by MHonArc 2.6.19+.

Top of page