NWOpenConnByAddr(3nw)


NWOpenConnByAddr -- opens a connection using the network address

Synopsis

   #include <nwconnec.h> 
   

NWCCODE N_API NWOpenConnByAddr( pnstr serviceType, nuint connFlags, NWCTranAddr N_FAR * tranAddr, NWCONN_HANDLE N_FAR * conn);

Description

The parameters are as follows:

serviceType
(IN) Points to the type of service required.

connFlags
(IN) Indicates whether the connection should be public or private.

tranAddr
(IN) Points to the transport address to open a connection to.

conn
(OUT) Points to the connection handle to be returned and may be used for all requests directed to the connection.

Return values

0x0000
SUCCESSFUL

Transport Not Loaded
No Local Connections
No Remote Connections
No Response Received
Out Of Memory

Notices

The only type presently defined for serviceType is NCP_SERVER. In the future, serviceType will include print servers, job servers, print queues and others.

connFlags can have the following values:

0x0001 NWC_OPEN_LICENSED
0x0002 NWC_OPEN_UNLICENSED
0x0004 NWC_OPEN_PRIVATE
0x0008 NWC_OPEN_PUBLIC

connFlags must reflect both the license state and the public state of the connection. For example, the value NWC_OPEN_PUBLIC | NWC_OPEN_LICENSED would be used to open public licensed connection.

Services

Connection

NCP calls

None

References

NWOpenConnByName(3nw), NWOpenConnByReference(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.