Delen via


StreamSocketListenerConnectionReceivedEventArgs.Socket Property

Definition

The StreamSocket object created when a connection is received by the StreamSocketListener object.

public:
 property StreamSocket ^ Socket { StreamSocket ^ get(); };
StreamSocket Socket();
public StreamSocket Socket { get; }
var streamSocket = streamSocketListenerConnectionReceivedEventArgs.socket;
Public ReadOnly Property Socket As StreamSocket

Property Value

The StreamSocket object created when a connection is received by the StreamSocketListener object.

Windows requirements

App capabilities
ID_CAP_NETWORKING [Windows Phone]

Remarks

Note From the perspective of a StreamSocket, a Parallel Patterns Library (PPL) completion handler is done executing (and the socket is eligible for disposal) before the continuation body runs. So, to keep your socket from being disposed if you want to use it inside a continuation, you'll need to use one of the techniques described in References to StreamSockets in C++ PPL continuations.

Applies to

See also