socketaccept
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 >> socketaccept <=  =>      <  1  >  
socketaccept – accept a connection on a socket

BEE Script:   socketaccept socketObj [newsocket=string];

 

BEE Tag:      <beesocketaccept socketObj [newsocket=string]>

 

The "socketlaccept" command is usually used by a server process.  This command accept a connection from the queue (see "socketlisten") and create a new socket for that connection.  After the connection is processed, the new socket should be closed and the original socket should be "listened" to again.

If there are multiple connections in the queue, the first one will be "accepted".  If there are no connections in the queue, the process will be suspended waiting for the arrival of a new connection.

If the socket is set to non-blocking (see "socketcontrol") and there is no connection in the queue, the process will return an error.

Parameters

socket (the socketObj) is the name of the socket where the new connection is to be accepted.

newsocket is the name of the new socket object to be created for the process to communicate with the process or host making the connection.  The address and port of the connection (of the server process) can be obtained from newSock%address and newSock%port respectively, where newSock is the value of the "newsocket" parameter.  The address and port of the (client) process and host making the connection can be obtained from newSock%remote:address and newSock%remote:port respectively.

 

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