Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (24 sloc) 736 Bytes
#include <string>
class SocketListener {
* Start a UDP server at the given address
* @param ip_address IP address to listen on ( binds to all)
* @param port Port to listen on (58082 is popular)
void Connect(std::string ip_address, unsigned int port);
* Get a frame of data from the socket and check that it is valid.
* @param frame Buffer to store the frame in.
* @param length Expected length of the frame.
* @return 0 if successful, < 0 if a failure occurred.
int GetFrame(char* frame, int length);
std::string m_address;
unsigned int m_port;
int m_fd;