socketcreate
Username:  
Password:
  > Home
> User Guide
v Reference
    > Introduction
    > CROFT
    > BEE Variables
    > BEE Syntax
    v BEE Commands
       > Variable Operations
       > Conditional
       > Loop
       > Module Calling
       > Remote Calling
       > Authentication
       > Data Access
       v Socket
          o socketcreate
          o socketbind
          o socketlisten
          o socketaccept
          o socketconnect
          o socketread
          o socketwrite
          o socketclose
          o socketcontrol
       > Special Functions
    > Database Operation
    > Content Management
    > Objects and Classes
    > Interface with others
    o Glossary
> Portal Object
> Development Guide


Shortcuts
sys Class
debug Class
Intrinsic Conversions
>> Reference >> BEE Commands >> Socket >> socketcreate <=  =>      <  1  >  
socketcreate – create an endpoint for communication

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.)

Previous Page       Next Page

Accsoft Computer Technology Pty Ltd     ABN: 98 065 617 549
PO Box 892, Epping NSW 1710         Level 1, Epping Office Park, 242 Beecroft Rd, Epping NSW 2121, Australia
Tel: Sydney - (02)98691668     National - 1300-881668         Fax: (02)98691866
© Copyright 2003 Accsoft Computer Technology Pty Ltd