@@ -723,51 +723,6 @@ class SlackWebsocketAPIClient:
723
723
for handler in self.error_handlers:
724
724
handler(error)
725
725
726
- async def send_message(self, message):
727
- \\ "\\ "\\ "
728
- Send a message using the WebSocket connection attached to this instance.
729
-
730
- Args:
731
- message (dict or str): The message to send. Will be serialized to JSON if it's a dictionary.
732
-
733
- Raises:
734
- Exception: If sending fails or the socket is not connected.
735
- \\ "\\ "\\ "
736
- await self._send(message, self.ws_app)
737
-
738
- @staticmethod
739
- async def send_message_static(message, socket):
740
- \\ "\\ "\\ "
741
- Send a message using a provided WebSocket connection, without needing an instance.
742
-
743
- Args:
744
- message (dict or str): The message to send.
745
- socket (websockets.WebSocketCommonProtocol): The WebSocket to send through.
746
-
747
- Raises:
748
- Exception: If sending fails or the socket is not connected.
749
- \\ "\\ "\\ "
750
- await HoppscotchEchoWebSocketClient._send(message, socket)
751
-
752
- @staticmethod
753
- async def _send(message, socket):
754
- \\ "\\ "\\ "
755
- Internal helper to handle the actual sending logic.
756
-
757
- Args:
758
- message (dict or str): The message to send.
759
- socket (websockets.WebSocketCommonProtocol): The WebSocket to send through.
760
-
761
- Notes:
762
- If message is a dictionary, it will be automatically converted to JSON.
763
- \\ "\\ "\\ "
764
- try:
765
- if isinstance(message, dict):
766
- message = json.dumps(message)
767
- await socket.send(message)
768
- except Exception as e:
769
- print(\\ "Error sending:\\ ", e)
770
-
771
726
def close(self):
772
727
\\ "\\ "\\ "Cleanly close the WebSocket connection.\\ "\\ "\\ "
773
728
self._stop_event.set()
@@ -904,9 +859,9 @@ class HoppscotchClient:
904
859
for handler in self.error_handlers:
905
860
handler(error)
906
861
907
- async def send_message (self, message):
862
+ async def sendEchoMessage (self, message):
908
863
\\ "\\ "\\ "
909
- Send a message using the WebSocket connection attached to this instance.
864
+ Send a sendEchoMessage message using the WebSocket connection attached to this instance.
910
865
911
866
Args:
912
867
message (dict or str): The message to send. Will be serialized to JSON if it's a dictionary.
@@ -917,9 +872,9 @@ class HoppscotchClient:
917
872
await self._send(message, self.ws_app)
918
873
919
874
@staticmethod
920
- async def send_message_static (message, socket):
875
+ async def sendEchoMessage_static (message, socket):
921
876
\\ "\\ "\\ "
922
- Send a message using a provided WebSocket connection, without needing an instance.
877
+ Send a sendEchoMessage message using a provided WebSocket connection, without needing an instance.
923
878
924
879
Args:
925
880
message (dict or str): The message to send.
@@ -928,7 +883,8 @@ class HoppscotchClient:
928
883
Raises:
929
884
Exception: If sending fails or the socket is not connected.
930
885
\\ "\\ "\\ "
931
- await HoppscotchEchoWebSocketClient._send(message, socket)
886
+ await HoppscotchClient._send(message, socket)
887
+
932
888
933
889
@staticmethod
934
890
async def _send(message, socket):
@@ -1085,9 +1041,9 @@ class HoppscotchEchoWebSocketClient:
1085
1041
for handler in self.error_handlers:
1086
1042
handler(error)
1087
1043
1088
- async def send_message (self, message):
1044
+ async def sendEchoMessage (self, message):
1089
1045
\\ "\\ "\\ "
1090
- Send a message using the WebSocket connection attached to this instance.
1046
+ Send a sendEchoMessage message using the WebSocket connection attached to this instance.
1091
1047
1092
1048
Args:
1093
1049
message (dict or str): The message to send. Will be serialized to JSON if it's a dictionary.
@@ -1098,9 +1054,9 @@ class HoppscotchEchoWebSocketClient:
1098
1054
await self._send(message, self.ws_app)
1099
1055
1100
1056
@staticmethod
1101
- async def send_message_static (message, socket):
1057
+ async def sendEchoMessage_static (message, socket):
1102
1058
\\ "\\ "\\ "
1103
- Send a message using a provided WebSocket connection, without needing an instance.
1059
+ Send a sendEchoMessage message using a provided WebSocket connection, without needing an instance.
1104
1060
1105
1061
Args:
1106
1062
message (dict or str): The message to send.
@@ -1111,6 +1067,7 @@ class HoppscotchEchoWebSocketClient:
1111
1067
\\ "\\ "\\ "
1112
1068
await HoppscotchEchoWebSocketClient._send(message, socket)
1113
1069
1070
+
1114
1071
@staticmethod
1115
1072
async def _send(message, socket):
1116
1073
\\ "\\ "\\ "
@@ -1267,9 +1224,9 @@ class PostmanEchoWebSocketClientClient:
1267
1224
for handler in self.error_handlers:
1268
1225
handler(error)
1269
1226
1270
- async def send_message (self, message):
1227
+ async def sendEchoMessage (self, message):
1271
1228
\\ "\\ "\\ "
1272
- Send a message using the WebSocket connection attached to this instance.
1229
+ Send a sendEchoMessage message using the WebSocket connection attached to this instance.
1273
1230
1274
1231
Args:
1275
1232
message (dict or str): The message to send. Will be serialized to JSON if it's a dictionary.
@@ -1280,9 +1237,9 @@ class PostmanEchoWebSocketClientClient:
1280
1237
await self._send(message, self.ws_app)
1281
1238
1282
1239
@staticmethod
1283
- async def send_message_static (message, socket):
1240
+ async def sendEchoMessage_static (message, socket):
1284
1241
\\ "\\ "\\ "
1285
- Send a message using a provided WebSocket connection, without needing an instance.
1242
+ Send a sendEchoMessage message using a provided WebSocket connection, without needing an instance.
1286
1243
1287
1244
Args:
1288
1245
message (dict or str): The message to send.
@@ -1291,7 +1248,8 @@ class PostmanEchoWebSocketClientClient:
1291
1248
Raises:
1292
1249
Exception: If sending fails or the socket is not connected.
1293
1250
\\ "\\ "\\ "
1294
- await HoppscotchEchoWebSocketClient._send(message, socket)
1251
+ await PostmanEchoWebSocketClientClient._send(message, socket)
1252
+
1295
1253
1296
1254
@staticmethod
1297
1255
async def _send(message, socket):
0 commit comments