dmnetconnect(3dm)
dmNetConnect, dmNetListen, dmNetAccept, dmNetRegisterPool - DMNetConnection connection management
As shipped in IRIX 6.5.15. Last changed in IRIX 6.5.5.
NAME dmNetConnect, dmNetListen, dmNetAccept, dmNetRegisterPool - DMNetConnection connection management SYNOPSIS #include <dmedia/dmnet.h> DMstatus dmNetConnect(DMNetConnection connection, DMParams* params); DMstatus dmNetListen(DMNETConnection connection, DMParams* params); DMstatus dmNetAccept(DMNetConnection connection, DMParams* params); DESCRIPTION dmNetConnect is the sender side routine which sets up a control connection. It opens a socket descriptor and tries to connect to the specified address. It calls connect and sets appropriate socket options. It requires a port and a hostname, specified through the parameters DMNET_PORT and DMNET_REMOTE_HOSTNAME. dmNetListen and dmNetAccept are the receiver side calls that set up a control connection. dmNetListen opens a socket descriptor for control, sets socket options as appropriate, calls bind to bind the control socket to a specified port and calls listen for an incoming connect request. dmNetAccept blocks until a connection is made. DIAGNOSTICS dmNetListen , dmNetAccept and dmNetConnect return DM_SUCCESS if a connection to the remote socket is made and the apropriate socket options were set successfully and DM_FAILURE otherwise. dmNetListen returns DM_FAILURE and sets errno to EADDRINUSE if it cannot bind to the specified port. dmNetListen is idempotent, and can be called more than once, to bind to different ports, for instance. dmNetAccept must be called only after dmNetListen returns DM_SUCCESS. SEE ALSO dmBufferCreatePool(3dm), dmParamsCreate(3dm), dmNetOpen(3dm),