Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 35 additions & 11 deletions xml/System.Net.Sockets/SendPacketsElement.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,16 @@
<Parameter Name="buffer" Type="System.ReadOnlyMemory&lt;System.Byte&gt;" Index="0" FrameworkAlternate="net-6.0" />
</Parameters>
<Docs>
<param name="buffer">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
<param name="buffer">A <see cref="T:System.ReadOnlyMemory`1" /> of bytes to send using the <see cref="M:System.Net.Sockets.Socket.SendPacketsAsync(System.Net.Sockets.SocketAsyncEventArgs)" /> method.</param>
<summary>Initializes a new instance of the <see cref="T:System.Net.Sockets.SendPacketsElement" /> class using the specified buffer.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The <xref:System.Net.Sockets.SendPacketsElement> class is used with the <xref:System.Net.Sockets.SocketAsyncEventArgs.SendPacketsElements%2A?displayProperty=nameWithType> property to get or set a data buffer or file to be sent using the <xref:System.Net.Sockets.Socket.SendPacketsAsync%2A?displayProperty=nameWithType> method.

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
Expand Down Expand Up @@ -244,10 +251,17 @@
<Parameter Name="endOfPacket" Type="System.Boolean" Index="1" FrameworkAlternate="net-6.0" />
</Parameters>
<Docs>
<param name="buffer">To be added.</param>
<param name="endOfPacket">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
<param name="buffer">A <see cref="T:System.ReadOnlyMemory`1" /> of bytes to send using the <see cref="M:System.Net.Sockets.Socket.SendPacketsAsync(System.Net.Sockets.SocketAsyncEventArgs)" /> method.</param>
<param name="endOfPacket">Specifies that this element should not be combined with the next element in a single send request from the sockets layer to the transport. This flag is used for granular control of the content of each message on a datagram or message-oriented socket.</param>
<summary>Initializes a new instance of the <see cref="T:System.Net.Sockets.SendPacketsElement" /> class using the specified buffer with an option to combine this element with the next element in a single send request from the sockets layer to the transport.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The <xref:System.Net.Sockets.SendPacketsElement> class is used with the <xref:System.Net.Sockets.SocketAsyncEventArgs.SendPacketsElements%2A?displayProperty=nameWithType> property to get or set a data buffer or file to be sent using the <xref:System.Net.Sockets.Socket.SendPacketsAsync%2A?displayProperty=nameWithType> method.

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
Expand Down Expand Up @@ -717,7 +731,9 @@
<format type="text/markdown"><![CDATA[

## Remarks
The default value for the <xref:System.Net.Sockets.SendPacketsElement.Buffer> property is `null` if the <xref:System.Net.Sockets.SendPacketsElement> object was not initialized with a `buffer` parameter.
The default value for the <xref:System.Net.Sockets.SendPacketsElement.Buffer> property is `null` if the <xref:System.Net.Sockets.SendPacketsElement> object was not initialized with a `buffer` parameter or `buffer` was passed as a <xref:System.ReadOnlyMemory`1> of bytes.

In the latter case, the buffer can be obtained using the <xref:System.Net.Sockets.SendPacketsElement.MemoryBuffer> property.

]]></format>
</remarks>
Expand Down Expand Up @@ -927,9 +943,17 @@
<ReturnType>System.Nullable&lt;System.ReadOnlyMemory&lt;System.Byte&gt;&gt;</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>Gets the buffer to be sent if the <see cref="T:System.Net.Sockets.SendPacketsElement" /> object was initialized with a <code>buffer</code> parameter.</summary>
<value>The <see cref="T:System.ReadOnlyMemory`1" /> of bytes to be sent if the <see cref="T:System.Net.Sockets.SendPacketsElement" /> object was initialized with a <code>buffer</code> parameter.</value>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The default value for the <xref:System.Net.Sockets.SendPacketsElement.MemoryBuffer> property is `null` if the <xref:System.Net.Sockets.SendPacketsElement> object was not initialized with a `buffer` parameter.
If `buffer` was passed as a `byte[]`, <xref:System.Net.Sockets.SendPacketsElement.MemoryBuffer> returns the contents of <xref:System.Net.Sockets.SendPacketsElement.Buffer> as a <xref:System.ReadOnlyMemory`1> of bytes.

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Offset">
Expand Down
40 changes: 32 additions & 8 deletions xml/System.Net.Sockets/TcpListener.xml
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,22 @@
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="0" FrameworkAlternate="net-6.0" />
</Parameters>
<Docs>
<param name="cancellationToken">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<param name="cancellationToken">A cancellation token that can be used to cancel the asynchronous operation.</param>
<summary>Accepts a pending connection request as a cancellable asynchronous operation.</summary>
<returns>The task object representing the asynchronous operation. The <see cref="P:System.Threading.Tasks.Task`1.Result" /> property on the task object returns a <see cref="T:System.Net.Sockets.Socket" /> used to send and receive data.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
This operation will not block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after the socket connection has been accepted.

The <xref:System.Net.Sockets.Socket> returned in <xref:System.Threading.Tasks.Task%601> is initialized with the IP address and port number of the remote host. You can use any of the <xref:System.Net.Sockets.Socket.Send%2A> and <xref:System.Net.Sockets.Socket.Receive%2A> methods available in the <xref:System.Net.Sockets.Socket> class to communicate with the remote host. When you are finished using the <xref:System.Net.Sockets.Socket>, be sure to call its <xref:System.Net.Sockets.Socket.Close%2A> method. If your application is relatively simple, consider using the <xref:System.Net.Sockets.TcpListener.AcceptTcpClient%2A> method rather than the <xref:System.Net.Sockets.TcpListener.AcceptSocketAsync%2A> method. <xref:System.Net.Sockets.TcpClient> provides you with simple methods for sending and receiving data over a network in blocking synchronous mode.

> [!NOTE]
> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AcceptTcpClient">
Expand Down Expand Up @@ -571,10 +583,22 @@
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="0" FrameworkAlternate="net-6.0" />
</Parameters>
<Docs>
<param name="cancellationToken">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<param name="cancellationToken">A cancellation token that can be used to cancel the asynchronous operation</param>
<summary>Accepts a pending connection request as a cancellable asynchronous operation.</summary>
<returns>The task object representing the asynchronous operation. The <see cref="P:System.Threading.Tasks.Task`1.Result" /> property on the task object returns a <see cref="T:System.Net.Sockets.TcpClient" /> used to send and receive data.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
This operation will not block. The returned <xref:System.Threading.Tasks.Task%601> object will complete after the TCP connection has been accepted.

Use the <xref:System.Net.Sockets.TcpClient.GetStream%2A?displayProperty=nameWithType> method to obtain the underlying <xref:System.Net.Sockets.NetworkStream> of the returned <xref:System.Net.Sockets.TcpClient> in the <xref:System.Threading.Tasks.Task%601>. The <xref:System.Net.Sockets.NetworkStream> will provide you with methods for sending and receiving with the remote host. When you are through with the <xref:System.Net.Sockets.TcpClient>, be sure to call its <xref:System.Net.Sockets.TcpClient.Close%2A> method. If you want greater flexibility than a <xref:System.Net.Sockets.TcpClient> offers, consider using <xref:System.Net.Sockets.TcpListener.AcceptSocket%2A> or <xref:System.Net.Sockets.TcpListener.AcceptSocketAsync%2A>.

> [!NOTE]
> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](/dotnet/framework/network-programming/network-tracing).

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Active">
Expand Down