Skip to content

Commit af6bff4

Browse files
committed
Fixed test script, fixed bug with UDP Listener, Added reliability flag to echoClient
1 parent 85805dc commit af6bff4

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

examples/echo_example/echoClient.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import sys
33
import argparse
44
import ipaddress
5-
sys.path.append(sys.path[0] + "/../..")
6-
import pytaps as taps # noqa: E402
5+
import pytaps as taps
76

87
color = "yellow"
98

@@ -103,7 +102,8 @@ async def main(self, args):
103102
# Create transportProperties Object and set properties
104103
# Does nothing yet
105104
tp = taps.TransportProperties()
106-
tp.require("reliability")
105+
tp.require("reliability") if args.reliable in ["yes", "true"] else tp.prohibit("reliability")
106+
107107
tp.ignore("congestion-control")
108108
tp.ignore("preserve-order")
109109
# tp.add("Reliable_Data_Transfer", taps.preferenceLevel.REQUIRE)
@@ -136,6 +136,7 @@ async def main(self, args):
136136
ap.add_argument('--trust-ca', type=str, default=None)
137137
ap.add_argument('--secure', '-s', nargs='?', const=True,
138138
type=bool, default=False)
139+
ap.add_argument('--reliable', '-r', type=str, default="yes")
139140
args = ap.parse_args()
140141
print(args)
141142
# Start testclient

pytaps/connection.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,6 @@ async def race(self):
164164
str(candidate[2]) + ", port " +
165165
str(self.remote_endpoint.port), color)
166166
self.remote_endpoint.address = candidate[2]
167-
if not self.local_endpoint:
168-
if self.initiate_error:
169-
self.loop.create_task(self.initiate_error(self))
170167

171168
# Create a datagram endpoint
172169
task = self.loop.create_task(

tests/run_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Run echo server on ports 6666 (TCP/UDP) and 6667 (TLS)
33
# Then run tests
44

5-
PYTHON="python3.7"
5+
PYTHON="python"
66

77
$PYTHON ../examples/echo_example/echoServer.py --local-address=::1 --local-port=6666 --reliable both >/dev/null 2>&1 &
88

0 commit comments

Comments
 (0)