multicastlisten.h 905 B

1234567891011121314151617181920212223242526
  1. /*
  2. ** JNetLib
  3. ** Copyright (C) 2008 Nullsoft, Inc.
  4. ** Author: Ben Allison
  5. ** File: multicastlisten.h - JNL interface for opening a Multicast UDP listen
  6. ** License: see jnetlib.h
  7. **
  8. ** Usage:
  9. ** 1. create a JNL_MulticastUDPListen object with the port and (optionally) the interface
  10. ** to listen on.
  11. ** 2. call get_connect() to get the associated UDP connection (optionally specifying what
  12. ** buffer sizes the connection should be created with). Unlike TCP listen, there is only one listen object.
  13. ** 3. check is_error() to see if an error has occured
  14. ** 4. call port() if you forget what port the listener is on.
  15. **
  16. */
  17. #ifndef _MULTICASTLISTEN_H_
  18. #define _MULTICASTLISTEN_H_
  19. #include "udpconnection.h"
  20. int CreateMulticastListener( JNL_UDPConnection **connection, const char *mcast_ip, unsigned short port, size_t sendbufsize = 8192, size_t recvbufsize = 8192 );
  21. #endif //_LISTEN_H_