Accepts a TCP/IP connection on a specified port.
INKAction INKNetAccept (INKCont
contp
, int
port
)
INKCont
is the
continuation that's called back when a connection is
accepted.contp
int
is the port
that will listen for incoming TCP/IP connections.port
Accepts a TCP/IP connection on
. When Traffic
Server receives a connection on a specified port, it calls back
port
with the event
contp
INK_EVENT_NET_ACCEPT
or
INK_EVENT_NET_ACCEPT_FAILED
.
If event is INK_EVENT_NET_ACCEPT
, then the
void *
passed to the handler of the continuation
data
is a
NetVConnection datatype that represents the connection.contp
If event is INK_EVENT_NET_ACCEPT_FAILED
, then it
means a connection attempt was aborted or failed. The plugin
should just return from the continuation's handler.
The user (
)
has the option to cancel the action returned by contp
INKNetAccept
by
using INKActionCancel
.
An INKAction
object if successful.
INK_ERROR_PTR
if an argument was incorrect or
if the API failed.