DMNETCONNECT(3dm) DMNETCONNECT(3dm)
dmNetConnect, dmNetListen, dmNetAccept, dmNetRegisterPool -
DMNetConnection connection management
#include <dmedia/dmnet.h>
DMstatus dmNetConnect(DMNetConnection connection, DMParams* params);
DMstatus dmNetListen(DMNETConnection connection, DMParams* params);
DMstatus dmNetAccept(DMNetConnection connection, DMParams* params);
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.
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.
dmBufferCreatePool(3dm), dmParamsCreate(3dm), dmNetOpen(3dm),
DMNETCONNECT(3dm) DMNETCONNECT(3dm)
dmNetConnect, dmNetListen, dmNetAccept, dmNetRegisterPool -
DMNetConnection connection management
#include <dmedia/dmnet.h>
DMstatus dmNetConnect(DMNetConnection connection, DMParams* params);
DMstatus dmNetListen(DMNETConnection connection, DMParams* params);
DMstatus dmNetAccept(DMNetConnection connection, DMParams* params);
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.
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.
dmBufferCreatePool(3dm), dmParamsCreate(3dm), dmNetOpen(3dm),
PPPPaaaaggggeeee 1111 [ Back ]
|