socket()

Last-modified: 2006-12-18 (月) 15:43:50

[star] ソケットの作成
SOCKET socket (
  int af,
  int type,
  int protocol
);

[tip] パラメータ

af

  • [in]ソケットが使うaddress familyを指定します。
    • AF_UNSPEC(0)
    • AF_INET(2)
    • AF_NETBIOS(17)
    • AF_INET6(23)
    • AF_IRDA(26)
    • AF_BTM(32)

type

  • [in]ソケットのタイプを指定します。タイプにはSocket Typeを使う

protocol

  • [in]プロトコルの指定をします。0を指定を指定すればプロトコルを選んでくれます。
    • IPPROTO_TCP(6) - TCPを使う
    • IPPROTO_UDP(17) - UDPを使う
    • IPPROTO_RM(113) - Pragmatic General Multicast (PGM)を使う