首页 > 解决方案 > What is difference between socket.receive(buff,0,buff.length) and socket.receive(buff, buff.length,0)?

问题描述

I'm new in socket so I don't know what it the difference between socket.receive(buff,0,buff.length) and socket.receive(buff, buff.length,0)? I used recieve method many times but don't know differences.

标签: c#sockets

解决方案


我从微软网站获得了一些信息。

接收(字节 [],Int32,Int32,SocketFlags)

Receives the specified number of bytes from a bound Socket into the
specified offset position of the receive buffer, using the specified
SocketFlags.

接收(字节 [],Int32,SocketFlags)

Receives the specified number of bytes of data from a bound Socket
into a receive buffer, using the specified SocketFlags.

欲了解更多信息,请访问https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.socket.receive?view=netframework-4.8


推荐阅读