From 275d330eaaf04c707481e4a46b29d91b51a1ff96 Mon Sep 17 00:00:00 2001 From: Juraj Kubelka Date: Sat, 2 Sep 2023 14:58:40 -0400 Subject: [PATCH] add `Socket>>#connectTo:` [feenkcom/gtoolkit#3433] (cherry picked from commit 517f09e08dfd92eded27383e5ebaab3b6c619283) --- .../Socket.extension/instance/connectTo..st | 9 +++++++++ .../ZnUnixSocketClientTest.class/README.md | 0 .../ZnUnixSocketClientTest.class/properties.json | 11 +++++++++++ 3 files changed, 20 insertions(+) create mode 100644 repository/Zinc-HTTP-UnixSocket.package/Socket.extension/instance/connectTo..st create mode 100644 repository/Zinc-Tests.package/ZnUnixSocketClientTest.class/README.md create mode 100644 repository/Zinc-Tests.package/ZnUnixSocketClientTest.class/properties.json diff --git a/repository/Zinc-HTTP-UnixSocket.package/Socket.extension/instance/connectTo..st b/repository/Zinc-HTTP-UnixSocket.package/Socket.extension/instance/connectTo..st new file mode 100644 index 00000000..9c424414 --- /dev/null +++ b/repository/Zinc-HTTP-UnixSocket.package/Socket.extension/instance/connectTo..st @@ -0,0 +1,9 @@ +*Zinc-HTTP-UnixSocket +connectTo: socketAddress + | status | + status := self primSocketConnectionStatus: socketHandle. + status == Unconnected + ifFalse: [ InvalidSocketStatusException + signal: 'Socket status must be unconnected before opening a new connection' ]. + + self primSocket: socketHandle connectTo: socketAddress \ No newline at end of file diff --git a/repository/Zinc-Tests.package/ZnUnixSocketClientTest.class/README.md b/repository/Zinc-Tests.package/ZnUnixSocketClientTest.class/README.md new file mode 100644 index 00000000..e69de29b diff --git a/repository/Zinc-Tests.package/ZnUnixSocketClientTest.class/properties.json b/repository/Zinc-Tests.package/ZnUnixSocketClientTest.class/properties.json new file mode 100644 index 00000000..253ca76c --- /dev/null +++ b/repository/Zinc-Tests.package/ZnUnixSocketClientTest.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "", + "super" : "TestCase", + "category" : "Zinc-Tests", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "ZnUnixSocketClientTest", + "type" : "normal" +} \ No newline at end of file