Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

soc_getevent() - get socket event

&pagelevel(4)&pagelevel

#include <sys.socket.h>

ANSI-C:
int soc_getevent(struct aevent * exb_event);


Description

The function soc_getevent() provides the caller with information about a delivered event signaled to the bourse used by the caller.
Standard data and event-specific data are stored in the output structure aevent.

The signal to the bourse transfers a 2-word post code with the following structure:

Word 1:


Byte 1:

 Event code X‘3E‘


Byte 2:

User Call Indicator


              

X‘14‘ =

IPv4 event



X‘15‘ =

IPv6 event


Byte 3:

Event Indicator



C‘E’ =

Normal event (see list of possible events in section "Possible events" in chapter "soc_getevent() - get socket event")



C‘W’ =
               

Event was triggered by a Wake incident
User Call Indicator = X‘00‘.



C‘S‘ =

Event was triggered by BCEND.
User Call Indicator = X‘00‘ and word 2 = X‘00000000‘.



C'N' =

No event has occurred. This event mainly gives feedback to SOCKETS.
User Call Indicator = X'00'


Byte 4: X‘00‘

Word 2:


Undefined

The aevent is declared as follows in <sys.socket.h>


struct aevent {
   int   fd;              /* socket filedescriptor */
   int   event;            /* transport system event*/
   int   subevent;         /* additional information about the event*/
   int   datalen;          /* data length transferred to caller*/
   int   fd_errno;         /* errno */
   int   fd_array_cnt;     /* number of FD's, if ECLS event*/
   int   fd_array[FD_MAX]; /* FD's for ECLS event*/
   }


Return value

0:

Success

1:

Error

Possible events

EXB_ECLS

TSAP Termination Indication, forced termination of the TSAP by the transport system.Data: fd, event, fd_array_cnt, fd_array

EXB_ERQQ

Connection Request Indication, connection request.
Data: fd, event

EXB_ERSP

Connection Response Indication, partner’s acknowledgment of connection request.Data: fd, event

EXB_EDIS

Disconnect Indication, disconnection request.
Data: fd, event

EXB_EDTA

Data Indication, TCP data reception
Data: fd, event, datalen

EXB_EDTU

Unitdata Indication, UDP data reception.
Data: fd, event, datalen

EXB_EERR

Error Report Indication
ICMP error message

EXB_EGOD

Data Go Indication, data transfer can be continued.
Data: fd, event

EXB_NOEV

No event present.
The return value is set to 1. 

EXB_TRYL

No event can currently be retrieved.
However, another attempt can be made later.
The return value is set to 1. 

EXB_SHUT

The BCAM transport system has been terminated or is currently in the
termination phase.
The application must also be terminated.
The return value is set to 1.

The errno is set if an error occurs.