BEE Script: socketcreate socketObj
[domain=string] [type=string]
[protocol=string] [listen=bool];
BEE Tag: <beesocketcreate socketObj
[domain=string] [type=string]
[protocol=string] [listen=bool]>
The "socketcreate" command creates an endpoint for communicating with another process or host. It does not do the actual communication but to specify the property of the socket for subsequent socket commands. These properties are stored in the socketObj object.
Parameters
socket (the socketObj) is the name of the object holding the socket's properties.
domain is one of the followings: const%socket:AF_INET (default): IPv4 Internet based protocols const%socket:AF_UNIX: Local communication good for Interprocess Communication
type is one of the followings: const%socket:SOCK_STREAM (default): Sequenced, full-duplex byte stream (for TCP) const%socket:SOCK_DGRAM: Datagrams (connectionless for UDP) const%socket:SOCK_RAW: Raw network protocol access (used to construct any protocols like ICMP) const%socket:SOCK_SEQPACKET: Sequenced, two-way for datagrams (entire packet in each read) const%socket:SOCK_RDM: Reliable Datagram layer (order not guaranteed, likely not implemented)
protocol is one of the followings: const%socket:SOL_TCP (default): Transmission Control Protocol const%socket:SOL_UDP: User Datagram Protocol const%socket:SOL_ICMP: Internet Control Message Protocol
listen is the port number on which the socket is opened to accept connection from other processes or hosts. If listen is specified, the "domain", "type" and "protocol" parameters will be ignored. "domain" will be taken as const%socket:AF_INET and "type" will be taken as const%socket:SOCK_STREAM. ("listen" is usually used is a "server" process.)
|