Lingua

SocketError Classe

Definizione

Fornisce lo stato di errore del socket per le operazioni su un oggetto DatagramSocket, StreamSocket o StreamSocketListener.

public ref class SocketError abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class SocketError final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public static class SocketError
Public Class SocketError
Ereditarietà
Object Platform::Object IInspectable SocketError
Attributi

Requisiti Windows

Requisiti Descrizione
Famiglia di dispositivi
Windows 10 (è stato introdotto in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (è stato introdotto in v1.0)

Commenti

Viene restituito un errore durante l'operazione socket come valore HRESULT . Il metodo GetStatus nell'oggetto SocketError viene utilizzato per convertire un errore da un'operazione socket a un valore di enumerazione SocketErrorStatus . La maggior parte dei valori di enumerazione SocketErrorStatus corrisponde a un errore restituito dall'operazione nativa Windows socket.

Metodi

Nome Descrizione
GetStatus(Int32)

Ottiene un valore SocketErrorStatus in base a un errore rilevato da un'operazione socket.

Si applica a

Vedi anche