Test for proper connection state after a successful accept/connect.

Test for #54.
This commit is contained in:
Sönke Ludwig 2018-03-07 10:59:31 +01:00
parent 008163e913
commit d15e78a517

View file

@ -30,6 +30,7 @@ void main()
server.waitForConnections!((incoming_, addr) {
incoming = incoming_; // work around ref counting issue
assert(incoming.state == ConnectionState.connected);
print("Got incoming, reading data");
incoming.read!((status, bts) {
print("Got data");
@ -67,6 +68,7 @@ void main()
connectStream!((sock, status) {
client = sock;
assert(status == ConnectStatus.connected);
assert(sock.state == ConnectionState.connected);
print("Initial write");
client.write!((wstatus, bytes) {
print("Initial write done");