2 instantiations of HandshakeResult
Microsoft.Build (2)
CommunicationsUtilities.cs (2)
199
public static HandshakeResult Success(int value = 0, byte negotiatedPacketVersion = 1) =>
new
(HandshakeStatus.Success, value, null, negotiatedPacketVersion);
207
public static HandshakeResult Failure(HandshakeStatus status, string errorMessage) =>
new
(status, 0, errorMessage);
28 references to HandshakeResult
Microsoft.Build (28)
BackEnd\Client\MSBuildClient.cs (1)
610
_nodeStream, _pipeName, _handshake, Math.Max(1, timeoutMilliseconds - (int)sw.ElapsedMilliseconds), out
HandshakeResult
result))
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (8)
181
Stream nodeStream = TryConnectToProcess(nodeProcess.Id, timeout, NodeProviderOutOfProc.GetHandshake(nodeReuse, false), out
HandshakeResult
result);
350
Stream nodeStream = TryConnectToProcess(nodeToReuse.Id, 0 /* poll, don't wait for connections */, nodeLaunchData.Handshake, out
HandshakeResult
result);
417
Stream nodeStream = TryConnectToProcess(msbuildProcess.Id, TimeoutForNewNodeCreation, nodeLaunchData.Handshake, out
HandshakeResult
result);
755
private Stream TryConnectToProcess(int nodeProcessId, int timeout, Handshake handshake, out
HandshakeResult
result)
799
result =
HandshakeResult
.Failure(HandshakeStatus.Undefined, "Check the COMM traces to diagnose the issue with communication.");
810
internal static bool TryConnectToPipeStream(NamedPipeClientStream nodeStream, string pipeName, Handshake handshake, int timeout, out
HandshakeResult
result)
844
out
HandshakeResult
innerResult))
848
result =
HandshakeResult
.Success(0, innerResult.NegotiatedPacketVersion);
CommunicationsUtilities.cs (17)
179
/// Initializes a new instance of the <see cref="
HandshakeResult
"/> class.
198
/// <returns>A new <see cref="
HandshakeResult
"/> instance representing a successful operation.</returns>
199
public static
HandshakeResult
Success(int value = 0, byte negotiatedPacketVersion = 1) => new(HandshakeStatus.Success, value, null, negotiatedPacketVersion);
206
/// <returns>A new <see cref="
HandshakeResult
"/> instance representing a failed operation.</returns>
207
public static
HandshakeResult
Failure(HandshakeStatus status, string errorMessage) => new(status, 0, errorMessage);
489
out
HandshakeResult
result)
497
out
HandshakeResult
innerResult))
517
out
HandshakeResult
versionResult))
545
result =
HandshakeResult
.Success(0, negotiatedPacketVersion);
555
private static
HandshakeResult
CreateVersionMismatchResult(bool isProvider, int receivedValue)
562
return
HandshakeResult
.Failure(HandshakeStatus.VersionMismatch, errorMessage);
576
out
HandshakeResult
result
601
result =
HandshakeResult
.Failure(HandshakeStatus.Timeout, String.Format(CultureInfo.InvariantCulture, "Did not receive return handshake in {0}ms", timeout));
616
result =
HandshakeResult
.Failure(HandshakeStatus.OldMSBuild, String.Format(CultureInfo.InvariantCulture, "Client: rejected old host. Received byte {0} instead of {1}.", bytes[0], byteToAccept));
624
result =
HandshakeResult
.Failure(HandshakeStatus.UnexpectedEndOfStream, String.Format(CultureInfo.InvariantCulture, "Unexpected end of stream while reading for handshake"));
639
result =
HandshakeResult
.Success(BitConverter.ToInt32(bytes, 0 /* start index */));
643
result =
HandshakeResult
.Failure(HandshakeStatus.EndiannessMismatch, String.Format(CultureInfo.InvariantCulture, "Failed to convert the handshake to big-endian. {0}", ex.Message));
NodeEndpointOutOfProcBase.cs (2)
423
out
HandshakeResult
result))
449
_pipeServer.TryReadEndOfHandshakeSignal(false, ClientConnectTimeout, out
HandshakeResult
_)) /* wait a long time for the handshake from this side */