From ed3e023d1da3465bc79a91d38950a167004911b2 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sat, 16 Nov 2024 02:11:24 +0530 Subject: First Commit --- src/Client/SocketClient.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/Client/SocketClient.java (limited to 'src/Client/SocketClient.java') diff --git a/src/Client/SocketClient.java b/src/Client/SocketClient.java new file mode 100644 index 0000000..9ce80a3 --- /dev/null +++ b/src/Client/SocketClient.java @@ -0,0 +1,19 @@ +package Client; + +import io.socket.client.IO; +import io.socket.client.Socket; + +import java.net.URISyntaxException; + +public class SocketClient { + public static Socket socket; + + public SocketClient(String url) { + try { + socket = IO.socket(url); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + + } +} -- cgit v1.2.3