bind static method
Future<SocketTerminalHostServer>
bind({
- InternetAddress? address,
- int port = 2323,
- bool v6Only = false,
- required SocketTerminalSessionHandler onSession,
Binds a socket host server.
Implementation
static Future<SocketTerminalHostServer> bind({
io.InternetAddress? address,
int port = 2323,
bool v6Only = false,
bool shared = false,
required SocketTerminalSessionHandler onSession,
}) async {
final server = await io.ServerSocket.bind(
address ?? io.InternetAddress.loopbackIPv4,
port,
v6Only: v6Only,
shared: shared,
);
return SocketTerminalHostServer._(server: server, onSession: onSession);
}