NAME

coreNetOptionSet() -- set, and configure, the netCORE option.


SYNOPSIS

include "appcore.h"

int coreNetOptionSet( 
     coreNetOptionSPEC_t* s,
     coreNetOption_t  o,
     void* d,
     size_t l )

DESCRIPTION

The coreNetOptionSet() function sets, and configures, the specified netCORE option. The available options are enumerated via the coreNetOption_t data type. This function operates like the standard socket option functions. For options that are simple on-off, no data is required. For options that require configuration data, a pointer to the data and it's length is required. Before a network channel is opened, the user should set all required options.


PARAMETERS

s
   pointer to the coreNetOptionSPEC_t in the channel specification.
o
   one of the enumerated options.
d
   optional pointer to a data buffer for option configuration
l
   length of option data buffer

Sample Code


   // Set receive only channel

   coreNetOptionSet(
      &Spec,
      coreNetOptionDIR_RX,
      NULL,
      0 );

   // Set message processing option

   coreNetChanMsgSPEC_t MsgSpec;

   bzero( &MsgSpec, sizeof(MsgSpec) );
   MsgSpec.HeaderLength = sizeof( YourMsgHeader );
   MsgSpec.GetPayloadSize = YourMsgGetPayloadSize;

   // Set the option

   coreNetOptionSet( 
      &Options,
      coreNetOptionMSG,
      &MsgSpec,
      sizeof(MsgSpec) );


RETURN VALUE

errno ValueCondition
EINVALspecification is NULL EINVALinvalid, or unsupported, channel option EINVALoption buffer NULL, option buffer length non-zero EINVALoption buffer defined, length zero

MULTI-THREAD SAFETY LEVEL

MT-safe.


SEE ALSO

Functions:
coreNetServerPortAdd() coreNetServerPortRemove() coreNetChanAccept() coreNetChanConnect() coreNetChanOpen() coreNetChanPayloadMsg() coreNetChanTxFlow() coreNetChanRxFlow() coreNetOptionSet() coreNetOptionClear() coreNetAddrInit()