I write ip/port scanner so users using search on our LAN know if the particular ftp is online or not.

The class I write has the following structure:

Code:
public class IPScanner
{
    public IPScanner() { }

    private void connect(object data)
    {
         Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
...