SocketGUS
Fork of Socket by
Diff: UDPSocket.h
- Revision:
- 3:e6474399e057
- Parent:
- 2:b227d242f3c7
- Child:
- 5:300e7ad2dc1d
--- a/UDPSocket.h Mon Jul 23 11:52:50 2012 +0000 +++ b/UDPSocket.h Wed Jul 25 14:59:37 2012 +0000 @@ -19,23 +19,21 @@ #ifndef UDPSOCKET_H #define UDPSOCKET_H -#include "Socket/socket.h" +#include "Socket/Socket.h" #include <cstdint> /** This is a C++ abstraction for UDP networking sockets. */ -class UDPSocket -{ +class UDPSocket : public Socket { public: - /** Instantiate a UDP Socket. */ UDPSocket(); ~UDPSocket(); - - /** Bind a socket to a specific port. + + /** Bind a UDP Server Socket to a specific port For a listening socket, bind the socket to the following port. \param port The port to listen for incoming connections on, using 0 here will select a random port. \return 0 on success, -1 on failure. @@ -61,16 +59,6 @@ \return the number of received bytes on success (>=0) or -1 on failure */ int receiveFrom(char* data, int length, char** host, int* port, int timeout = 0); - - /** Close the socket. - */ - int close(); - - private: - int init(); - - int m_sock; - }; #endif