/[resiprocate]/branches/b-directory-reorg/sip/resiprocate/InternalTransport.hxx
ViewVC logotype

Contents of /branches/b-directory-reorg/sip/resiprocate/InternalTransport.hxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5271 - (show annotations) (download)
Thu Aug 18 23:43:07 2005 UTC (14 years, 3 months ago) by jason
File size: 3982 byte(s)
new directory reorg proposal
1 #if !defined(RESIP_INTERNAL_TRANSPORT_HXX)
2 #define RESIP_INTERNAL_TRANSPORT_HXX
3
4 #include <exception>
5
6 #include "resiprocate/Message.hxx"
7 #include "resiprocate/Transport.hxx"
8 #include "resiprocate/os/BaseException.hxx"
9 #include "resiprocate/os/Data.hxx"
10 #include "resiprocate/os/Fifo.hxx"
11 #include "resiprocate/os/Socket.hxx"
12 #include "resiprocate/os/Tuple.hxx"
13 #include "resiprocate/SendData.hxx"
14
15 namespace resip
16 {
17
18 class TransactionMessage;
19 class SipMessage;
20 class Connection;
21
22 class InternalTransport : public Transport
23 {
24 public:
25 // sendHost what to put in the Via:sent-by
26 // portNum is the port to receive and/or send on
27 InternalTransport(Fifo<TransactionMessage>& rxFifo,
28 int portNum,
29 IpVersion version,
30 const Data& interfaceObj);
31
32 virtual ~InternalTransport();
33
34 virtual bool isFinished() const;
35 virtual bool hasDataToSend() const;
36
37 virtual bool shareStackProcessAndSelect() const { return true; }
38 virtual void startOwnProcessing() {}
39
40 // shared by UDP, TCP, and TLS
41 static Socket socket(TransportType type, IpVersion ipVer);
42 void bind();
43
44 //used for epoll
45 virtual int maxFileDescriptors() const { return 1; }
46 virtual unsigned int getFifoSize() const;
47 protected:
48 friend class SipStack;
49 virtual void transmit(const Tuple& dest, const Data& pdata, const Data& tid);
50
51 Socket mFd; // this is a unix file descriptor or a windows SOCKET
52 Fifo<SendData> mTxFifo; // owned by the transport
53 };
54
55
56 }
57
58 #endif
59
60 /* ====================================================================
61 * The Vovida Software License, Version 1.0
62 *
63 * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
64 *
65 * Redistribution and use in source and binary forms, with or without
66 * modification, are permitted provided that the following conditions
67 * are met:
68 *
69 * 1. Redistributions of source code must retain the above copyright
70 * notice, this list of conditions and the following disclaimer.
71 *
72 * 2. Redistributions in binary form must reproduce the above copyright
73 * notice, this list of conditions and the following disclaimer in
74 * the documentation and/or other materials provided with the
75 * distribution.
76 *
77 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
78 * and "Vovida Open Communication Application Library (VOCAL)" must
79 * not be used to endorse or promote products derived from this
80 * software without prior written permission. For written
81 * permission, please contact vocal@vovida.org.
82 *
83 * 4. Products derived from this software may not be called "VOCAL", nor
84 * may "VOCAL" appear in their name, without prior written
85 * permission of Vovida Networks, Inc.
86 *
87 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
88 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
89 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
90 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
91 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
92 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
93 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
94 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
95 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
96 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
97 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
98 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
99 * DAMAGE.
100 *
101 * ====================================================================
102 *
103 * This software consists of voluntary contributions made by Vovida
104 * Networks, Inc. and many individuals on behalf of Vovida Networks,
105 * Inc. For more information on Vovida Networks, Inc., please see
106 * <http://www.vovida.org/>.
107 *
108 */

Properties

Name Value
svn:eol-style LF

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27