socket.hh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /********************************************************************** <BR>
  2. This file is part of Crack dot Com's free source code release of
  3. Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
  4. information about compiling & licensing issues visit this URL</a>
  5. <PRE> If that doesn't help, contact Jonathan Clark at
  6. golgotha_source@usa.net (Subject should have "GOLG" in it)
  7. ***********************************************************************/
  8. class i4_socket_class
  9. {
  10. public:
  11. int fd;
  12. bind
  13. connect
  14. accept
  15. gethostbyname
  16. socket( AF_INET, SOCK_STREAM, 0);
  17. };
  18. /*
  19. This class responds to 'search' packets. When other games are looking for
  20. a server they should have some way of finding the notifier socket.
  21. */
  22. class i4_notifier_socket
  23. {
  24. i4_str *note_string;
  25. protected:
  26. i4_notifier_socket(int port, const i4_const_str &notification_string);
  27. public:
  28. virtual void set_notification_string(const i4_const_str &str);
  29. virtual void poll() = 0;
  30. virtual ~i4_notifier_socket();
  31. };
  32. class i4_finder_socket
  33. {
  34. protected:
  35. i4_finder_socket(int port);
  36. }