Exemplo n.º 1
0
 public void Add_socket_to_disposed_poller()
 {
     Udt.SocketPoller poller = new Udt.SocketPoller();
     poller.Dispose();
     Udt.Socket socket = new Udt.Socket(AddressFamily.InterNetwork, SocketType.Stream);
     Assert.Throws <ObjectDisposedException>(() => poller.AddSocket(socket));
     socket.Dispose();
 }
Exemplo n.º 2
0
 public void Add_socket_to_disposed_poller()
 {
     Udt.SocketPoller poller = new Udt.SocketPoller();
     poller.Dispose();
     Udt.Socket socket = new Udt.Socket(AddressFamily.InterNetwork, SocketType.Stream);
     Assert.Throws<ObjectDisposedException>(() => poller.AddSocket(socket));
     socket.Dispose();
 }
Exemplo n.º 3
0
 public void Constructor()
 {
     Udt.SocketPoller poller = new Udt.SocketPoller();
     CollectionAssert.IsEmpty(poller.ReadSockets);
     CollectionAssert.IsEmpty(poller.WriteSockets);
     poller.Dispose();
     CollectionAssert.IsEmpty(poller.ReadSockets);
     CollectionAssert.IsEmpty(poller.WriteSockets);
 }
Exemplo n.º 4
0
 public void Constructor()
 {
     Udt.SocketPoller poller = new Udt.SocketPoller();
     CollectionAssert.IsEmpty(poller.ReadSockets);
     CollectionAssert.IsEmpty(poller.WriteSockets);
     poller.Dispose();
     CollectionAssert.IsEmpty(poller.ReadSockets);
     CollectionAssert.IsEmpty(poller.WriteSockets);
 }
Exemplo n.º 5
0
 public void Wait_when_disposed()
 {
     Udt.SocketPoller poller = new Udt.SocketPoller();
     poller.Dispose();
     Assert.Throws <ObjectDisposedException>(() => poller.Wait());
 }
Exemplo n.º 6
0
 public void Wait_when_disposed()
 {
     Udt.SocketPoller poller = new Udt.SocketPoller();
     poller.Dispose();
     Assert.Throws<ObjectDisposedException>(() => poller.Wait());
 }