socket.h 575 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Part of Scheme 48 1.9. See file COPYING for notices and license.
  3. *
  4. * Authors: Mike Sperber, Marcus Crestani
  5. */
  6. #ifndef __NET_SOCKET_H__
  7. #define __NET_SOCKET_H__
  8. #ifdef _WIN32
  9. #include <winsock2.h>
  10. #include <mswsock.h>
  11. #else
  12. #include <sys/types.h>
  13. #include <sys/socket.h>
  14. #endif
  15. #include <scheme48.h>
  16. /* OS-unspecific */
  17. int s48_extract_msg_flags(s48_call_t call, s48_ref_t sch_flags);
  18. /* OS-specific */
  19. #ifdef _WIN32
  20. typedef SOCKET socket_t;
  21. #else
  22. typedef int socket_t;
  23. #endif
  24. socket_t s48_extract_socket_fd(s48_call_t call, s48_ref_t sch_channel);
  25. #endif