wsipx.inc
上传用户:hndmjx
上传日期:2014-09-16
资源大小:3369k
文件大小:2k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. {
  2. wsipx.h
  3. Microsoft Windows
  4. Copyright (C) Microsoft Corporation, 1992-1999.
  5. Windows Sockets include file for IPX/SPX.  This file contains all
  6. standardized IPX/SPX information.  Include this header file after
  7. winsock.h.
  8. To open an IPX socket, call socket() with an address family of
  9. AF_IPX, a socket type of SOCK_DGRAM, and protocol NSPROTO_IPX.
  10. Note that the protocol value must be specified, it cannot be 0.
  11. All IPX packets are sent with the packet type field of the IPX
  12. header set to 0.
  13. To open an SPX or SPXII socket, call socket() with an address
  14. family of AF_IPX, socket type of SOCK_SEQPACKET or SOCK_STREAM,
  15. and protocol of NSPROTO_SPX or NSPROTO_SPXII.  If SOCK_SEQPACKET
  16. is specified, then the end of message bit is respected, and
  17. recv() calls are not completed until a packet is received with
  18. the end of message bit set.  If SOCK_STREAM is specified, then
  19. the end of message bit is not respected, and recv() completes
  20. as soon as any data is received, regardless of the setting of the
  21. end of message bit.  Send coalescing is never performed, and sends
  22. smaller than a single packet are always sent with the end of
  23. message bit set.  Sends larger than a single packet are packetized
  24. with the end of message bit set on only the last packet of the
  25. send.
  26. }
  27. // This is the structure of the SOCKADDR structure for IPX and SPX.
  28. type
  29. SOCKADDR_IPX = packed record
  30. sa_family : u_short;
  31. sa_netnum : Array [0..3] of Char;
  32. sa_nodenum : Array [0..5] of Char;
  33. sa_socket : u_short;
  34. end;
  35. TSOCKADDR_IPX = SOCKADDR_IPX;
  36. PSOCKADDR_IPX = ^SOCKADDR_IPX;
  37. LPSOCKADDR_IPX = ^SOCKADDR_IPX;
  38. //  Protocol families used in the "protocol" parameter of the socket() API.
  39. const
  40. NSPROTO_IPX   = 1000;
  41. NSPROTO_SPX   = 1256;
  42. NSPROTO_SPXII = 1257;