import 'dart:io'; Socket.connect(IPADDR, PORT, timeout: Duration(seconds: 5)).then((socket){ print("Success"); socket.destroy(); }).catchError((error){ print("Exception on Socket "+error.toString()); });
import 'dart:io'; Socket.connect(IPADDR, PORT, timeout: Duration(seconds: 5)).then((socket){ print("Success"); socket.destroy(); }).catchError((error){ print("Exception on Socket "+error.toString()); });