Method Stdio.Port()->create()
- Method
create
Stdio.Port Stdio.Port()
Stdio.Port Stdio.Port(
int
|string
port
)
Stdio.Port Stdio.Port(
int
|string
port
,function
(:void
)accept_callback
)
Stdio.Port Stdio.Port(
int
|string
port
,function
(:void
)accept_callback
,string
ip
)
Stdio.Port Stdio.Port(
"stdin"
)
Stdio.Port Stdio.Port(
"stdin"
,function
(:void
)accept_callback
)- Description
If the first argument is other than
"stdin"
the arguments will be passed tobind()
.When create is called with
"stdin"
as the first argument, a socket is created out of the file descriptor0
. This is only useful if it actually is a socket to begin with, and is equivalent to creating a port and initializing it withlisten_fd
(0).- See also
bind