natplugins/natptraversalcontroller/src/ctcpcrlfsender.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "ctcpcrlfsender.h"
       
    20 
       
    21 // -----------------------------------------------------------------------------
       
    22 // CTcpCRLFSender::CTcpCRLFSender
       
    23 // -----------------------------------------------------------------------------
       
    24 //
       
    25 CTcpCRLFSender::CTcpCRLFSender(
       
    26     RSocket& aSocket,
       
    27     MNATBindingRefresherObserver& aObserver )
       
    28     : CCRLFSender( aObserver ),
       
    29       iSocket( aSocket )
       
    30     {
       
    31     }
       
    32 
       
    33 // -----------------------------------------------------------------------------
       
    34 // CTcpCRLFSender::~CTcpCRLFSender
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 CTcpCRLFSender::~CTcpCRLFSender()
       
    38     {
       
    39     Cancel();
       
    40     }
       
    41 
       
    42 // -----------------------------------------------------------------------------
       
    43 // CTcpCRLFSender::HasSocket
       
    44 // -----------------------------------------------------------------------------
       
    45 //
       
    46 TBool CTcpCRLFSender::HasSocket(const RSocket& aSocket) const
       
    47     {
       
    48     return (aSocket.SubSessionHandle() == iSocket.SubSessionHandle());
       
    49     }
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 // CTcpCRLFSender::DoCancel
       
    53 // From CActive
       
    54 // -----------------------------------------------------------------------------
       
    55 //
       
    56 void CTcpCRLFSender::DoCancel()
       
    57     {
       
    58     iSocket.CancelSend();
       
    59     }
       
    60 
       
    61 // -----------------------------------------------------------------------------
       
    62 // CTcpCRLFSender::Send
       
    63 // -----------------------------------------------------------------------------
       
    64 //
       
    65 void CTcpCRLFSender::Send( const TDesC8& aData )
       
    66     {
       
    67     iSocket.Send(aData,0,iStatus);
       
    68     }
       
    69 
       
    70 // End of File