Gets the connection state of the socket.
[Visual Basic] Public ReadOnly Property Connected As Boolean [C#] public bool Connected {get;} [C++] public: __property bool get_Connected(); [JScript] public function get Connected() : Boolean;
Connected returns true if the socket has connected to a remote resource or if the socket has accepted a connection from a remote resource; otherwise Connected returns false.
Socket Class | Socket Members | System.Net.Sockets Namespace