yate学习--yatesip.h--class YSIP_API SIPParty : public RefObjec
2015-05-22 15:37
295 查看
请声明出处:
这是一个关于自定义SIP的Party类:
这是一个关于自定义SIP的Party类:
class YSIP_API SIPParty : public RefObject { public: SIPParty(Mutex* mutex = 0); SIPParty(bool reliable, Mutex* mutex = 0); virtual ~SIPParty(); /** * Transmit an event * 传输一个事件 * @param event Evend to send * @参数even,要发送的事件 * @return False on fatal failure (subsequent send would fail again) * @返回false,严重失败(随后发送可能会再一次失败) */ virtual bool transmit(SIPEvent* event) = 0; virtual const char* getProtoName() const = 0; virtual bool setParty(const URI& uri) = 0; virtual void* getTransport() = 0; void setAddr(const String& addr, int port, bool local); void getAddr(String& addr, int& port, bool local); inline void appendAddr(String& buf, bool local, bool unsafe = true) { Lock lock(unsafe ? m_mutex : 0); if (local) SocketAddr::appendTo(buf,m_local,m_localPort); else SocketAddr::appendTo(buf,m_party,m_partyPort); } inline Mutex* mutex() { return m_mutex; } inline const String& getLocalAddr() const { return m_local; } inline const String& getPartyAddr() const { return m_party; } inline int getLocalPort() const { return m_localPort; } inline int getPartyPort() const { return m_partyPort; } inline bool isReliable() const { return m_reliable; } protected: Mutex* m_mutex; bool m_reliable; String m_local; String m_party; int m_localPort; int m_partyPort; };
相关文章推荐
- yate学习--yatesip.h--class YSIP_API SIPMessage : public RefObject
- yate学习--yateclass.h--class YATE_API Thread : public Runnable
- yate学习--yatengine.h--class YATE_API MessageReceiver : public GenObject
- yate学习--yateclass.h--class YATE_API SocketAddr : public GenObject
- yate学习--yateclass.h--class YATE_API ObjList : public GenObject
- yate--sip server的学习过程
- yate学习--yateclass.h--class YATE_API RefObject : public GenObject
- yate学习--yateclass.h--class YATE_API NamedString : public String
- Get machine IP and location via open api private static string GetOwnPublicIP() {
- yate学习--yateclass.h--class YATE_API NamedCounter : public String
- yate学习--yateclass.h--class YATE_API NamedList : public String
- yate学习--yateclass.h--class YATE_API GenObject
- yate学习--yateclass.h--class YATE_API Socket : public Stream
- yate学习--yatengine.h--class YATE_API Configuration : public String
- yate学习--yateclass.h--class YATE_API Runnable
- Criteria API 学习
- SIP学习三(SIP和VoIP协议及其应用)
- HDU 3062 Party (2-SAT入门学习)
- guava 学习笔记(二) 瓜娃(guava)的API快速熟悉使用
- ArcGIS API for Silverlight/WPF 2.1学习笔记(一)——精简版