From 331645f0fd7fbe7d9679d39dcce453cc3b2cab6e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 28 Jun 2016 10:36:28 +0300 Subject: spring-websocket --- .../java/com/juick/jabber/ws/SocketSubscribed.java | 51 ---------------------- 1 file changed, 51 deletions(-) delete mode 100644 src/main/java/com/juick/jabber/ws/SocketSubscribed.java (limited to 'src/main/java/com/juick/jabber/ws/SocketSubscribed.java') diff --git a/src/main/java/com/juick/jabber/ws/SocketSubscribed.java b/src/main/java/com/juick/jabber/ws/SocketSubscribed.java deleted file mode 100644 index 6144380c..00000000 --- a/src/main/java/com/juick/jabber/ws/SocketSubscribed.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.juick.jabber.ws; - -import java.nio.ByteBuffer; -import java.nio.channels.SocketChannel; - -/** - * - * @author ugnich - */ -public class SocketSubscribed { - - public SocketChannel sock = null; - public String clientName = null; - public int VUID = 0; - public int UID = 0; - public int MID = 0; - public boolean allMessages = false; - public boolean allReplies = false; - public long tsConnected; - public long tsLastData; - - public SocketSubscribed(SocketChannel sock, String clientName, int VUID) { - this.sock = sock; - this.clientName = clientName; - this.VUID = VUID; - tsConnected = tsLastData = System.currentTimeMillis(); - } - - public boolean sendByteBuffer(ByteBuffer bb) { - boolean ret = false; - bb.rewind(); - try { - sock.write(bb); - ret = true; - } catch (Exception e) { - close(); - } - return ret; - } - - public void close() { - try { - sock.socket().close(); - } catch (Exception e) { - } - try { - sock.close(); - } catch (Exception e) { - } - } -} -- cgit v1.2.3