public static DcmSocket Create(DcmSocketType type) { if (type == DcmSocketType.TLS) return new DcmTlsSocket(); else if (type == DcmSocketType.TCP) return new DcmTcpSocket(); else if (type == DcmSocketType.ISCL) return null; else return null; }
public static DcmSocket Create(DcmSocketType type) { if (type == DcmSocketType.TLS) { return(new DcmTlsSocket()); } else if (type == DcmSocketType.TCP) { return(new DcmTcpSocket()); } else if (type == DcmSocketType.ISCL) { return(null); } else { return(null); } }
public static DcmSocket Create(DcmSocketType type) { #if SILVERLIGHT return(type == DcmSocketType.TCP ? new DcmTcpSocket() : null); #else if (type == DcmSocketType.TLS) { return(new DcmTlsSocket()); } else if (type == DcmSocketType.TCP) { return(new DcmTcpSocket()); } else if (type == DcmSocketType.ISCL) { return(null); } else { return(null); } #endif }
public void Connect(string host, int port, DcmSocketType type) { _host = host; _port = port; _socketType = type; _stop = false; _isRunning = true; _thread = new Thread(Connect); _thread.IsBackground = true; _thread.Start(); }
public void AddPort(int port, DcmSocketType type) { _ports.Add(port); _types.Add(type); }
public static DcmSocket Create(DcmSocketType type) { #if SILVERLIGHT return type == DcmSocketType.TCP ? new DcmTcpSocket() : null; #else if (type == DcmSocketType.TLS) return new DcmTlsSocket(); else if (type == DcmSocketType.TCP) return new DcmTcpSocket(); else if (type == DcmSocketType.ISCL) return null; else return null; #endif }