-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathtest_connection.mojo
29 lines (24 loc) · 995 Bytes
/
test_connection.mojo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""
Establish a TCP connection.
This can be done by initiating a connection to the server's IP and port and checking for a successful handshake.
"""
"""
Send and receive data over the TCP connection.
Send a predefined set of data to the server and verify that the server receives and processes it correctly, and vice versa.
"""
"""
Handle multiple simultaneous TCP connections.
This involves opening several connections at once and ensuring the server can manage them without dropping or mixing up data.
"""
"""
Handle idle connections.
Establish a connection and then remain idle for longer than the server’s timeout setting to ensure the server properly closes the connection.
"""
"""
TCP Keep-Alive.
Validate that it keeps the connection active during periods of inactivity as expected.
"""
"""
Port Reusability.
After the server is stopped, ensure that the TCP port it was using can be immediately reused. Validate that the server is not leaving the port in a TIME_WAIT state.
"""