diff options
author | megamage <none@none> | 2009-02-12 17:09:15 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-12 17:09:15 -0600 |
commit | 6aee5fcbe7473a3cbac12b7e8482a7b98bef8be3 (patch) | |
tree | 91ec91d5c19eba9c2fe0e84b1c9dc7047a3de80e /dep/include/sockets/SctpSocket.h | |
parent | 2d2f433b4de1c35b22aaf07854fc0ee11fcb350d (diff) | |
parent | f385747164c3fb278c92ef46fbd6c3da6590bbf0 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'dep/include/sockets/SctpSocket.h')
-rw-r--r-- | dep/include/sockets/SctpSocket.h | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/dep/include/sockets/SctpSocket.h b/dep/include/sockets/SctpSocket.h index d6d55f6be78..49a360b16da 100644 --- a/dep/include/sockets/SctpSocket.h +++ b/dep/include/sockets/SctpSocket.h @@ -1,7 +1,7 @@ /** - ** \file SctpSocket.h - ** \date 2006-09-04 - ** \author grymse@alhem.net + ** \file SctpSocket.h + ** \date 2006-09-04 + ** \author grymse@alhem.net **/ /* Copyright (C) 2007 Anders Hedstrom @@ -40,63 +40,63 @@ class SocketAddress; class SctpSocket : public StreamSocket { public: - /** SctpSocket constructor. - \param h Owner - \param type SCTP_STREAM or SCTP_SEQPACKET */ - SctpSocket(ISocketHandler& h,int type); - ~SctpSocket(); - - /** bind() */ - int Bind(const std::string&,port_t); - int Bind(SocketAddress&); - /** sctp_bindx() */ - int AddAddress(const std::string&,port_t); - int AddAddress(SocketAddress&); - /** sctp_bindx() */ - int RemoveAddress(const std::string&,port_t); - int RemoveAddress(SocketAddress&); - - /** connect() */ - int Open(const std::string&,port_t); - int Open(SocketAddress&); - - /** Connect timeout callback. */ - void OnConnectTimeout(); + /** SctpSocket constructor. + \param h Owner + \param type SCTP_STREAM or SCTP_SEQPACKET */ + SctpSocket(ISocketHandler& h,int type); + ~SctpSocket(); + + /** bind() */ + int Bind(const std::string&,port_t); + int Bind(SocketAddress&); + /** sctp_bindx() */ + int AddAddress(const std::string&,port_t); + int AddAddress(SocketAddress&); + /** sctp_bindx() */ + int RemoveAddress(const std::string&,port_t); + int RemoveAddress(SocketAddress&); + + /** connect() */ + int Open(const std::string&,port_t); + int Open(SocketAddress&); + + /** Connect timeout callback. */ + void OnConnectTimeout(); #ifdef _WIN32 - /** Connection failed reported as exception on win32 */ - void OnException(); + /** Connection failed reported as exception on win32 */ + void OnException(); #endif #ifndef SOLARIS - /** sctp_connectx() */ - int AddConnection(const std::string&,port_t); - int AddConnection(SocketAddress&); + /** sctp_connectx() */ + int AddConnection(const std::string&,port_t); + int AddConnection(SocketAddress&); #endif - /** Get peer addresses of an association. */ - int getpaddrs(sctp_assoc_t id,std::list<std::string>&); - /** Get all bound addresses of an association. */ - int getladdrs(sctp_assoc_t id,std::list<std::string>&); + /** Get peer addresses of an association. */ + int getpaddrs(sctp_assoc_t id,std::list<std::string>&); + /** Get all bound addresses of an association. */ + int getladdrs(sctp_assoc_t id,std::list<std::string>&); - /** sctp_peeloff */ - int PeelOff(sctp_assoc_t id); + /** sctp_peeloff */ + int PeelOff(sctp_assoc_t id); - /** recvmsg callback */ - virtual void OnReceiveMessage(const char *buf,size_t sz,struct sockaddr *sa,socklen_t sa_len,struct sctp_sndrcvinfo *sinfo,int msg_flags) = 0; + /** recvmsg callback */ + virtual void OnReceiveMessage(const char *buf,size_t sz,struct sockaddr *sa,socklen_t sa_len,struct sctp_sndrcvinfo *sinfo,int msg_flags) = 0; - void OnOptions(int,int,int,SOCKET) {} + void OnOptions(int,int,int,SOCKET) {} - virtual int Protocol(); + virtual int Protocol(); protected: - SctpSocket(const SctpSocket& s) : StreamSocket(s) {} - void OnRead(); - void OnWrite(); + SctpSocket(const SctpSocket& s) : StreamSocket(s) {} + void OnRead(); + void OnWrite(); private: - SctpSocket& operator=(const SctpSocket& s) { return *this; } - int m_type; ///< SCTP_STREAM or SCTP_SEQPACKET - char *m_buf; ///< Temporary receive buffer + SctpSocket& operator=(const SctpSocket& s) { return *this; } + int m_type; ///< SCTP_STREAM or SCTP_SEQPACKET + char *m_buf; ///< Temporary receive buffer }; |