Namespace: DeltaEngine.Networking
Assembly: DeltaEngine.Networking (in DeltaEngine.Networking.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Networking.Tests.MessagingTests
1 unit tests call DeltaEngine.Networking.Messaging.StartSession(System.Int32)
Assembly: DeltaEngine.Networking (in DeltaEngine.Networking.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- port
- Type: System Int32
Return Value
Type: MessagingSessionRemarks
Examples
[Test, CloseAfterFirstFrame] public void WhenTwoServersExistMessagesAreSentToTheCorrectOne() { if (!StackTraceExtensions.IsStartedFromNCrunch()) return; //ncrunch: no coverage MessagingSession serverSession2 = Messaging.StartSession(Port + 1); MessagingSession clientSession2 = Messaging.JoinSession(Address, Port + 1); clientSession.SendMessage("first"); clientSession2.SendMessage("second"); Assert.AreEqual("first", serverSession.GetMessages()[0].Data); Assert.AreEqual("second", serverSession2.GetMessages()[0].Data); }
See Also