diff options
author | Vitaly Takmazov | 2016-01-30 16:13:30 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-01-30 16:13:30 +0300 |
commit | 474323453f1b881273f618555845e07ace830bd2 (patch) | |
tree | 11673a80973b3fb493912edc366ade720ecf40c4 /src/main/java/com/juick/xmpp/s2s/Connection.java | |
parent | 58fb4a6394cb19ee04e65d0e921cdf0ae6fdb6e3 (diff) |
s2s: NIO.2 sockets
Diffstat (limited to 'src/main/java/com/juick/xmpp/s2s/Connection.java')
-rw-r--r-- | src/main/java/com/juick/xmpp/s2s/Connection.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/com/juick/xmpp/s2s/Connection.java b/src/main/java/com/juick/xmpp/s2s/Connection.java index 6d32abbe..1a14b2cc 100644 --- a/src/main/java/com/juick/xmpp/s2s/Connection.java +++ b/src/main/java/com/juick/xmpp/s2s/Connection.java @@ -1,15 +1,16 @@ package com.juick.xmpp.s2s; +import org.xmlpull.mxp1.MXParser; +import org.xmlpull.v1.XmlPullParser; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; import java.io.FileWriter; import java.io.IOException; import java.io.OutputStreamWriter; -import java.net.Socket; +import java.nio.channels.AsynchronousSocketChannel; import java.util.Date; import java.util.logging.Logger; -import javax.crypto.Mac; -import javax.crypto.spec.SecretKeySpec; -import org.xmlpull.mxp1.MXParser; -import org.xmlpull.v1.XmlPullParser; /** * @@ -24,7 +25,7 @@ public class Connection { public long tsLocalData = 0; public long bytesLocal = 0; public long packetsLocal = 0; - Socket socket; + AsynchronousSocketChannel socket; final XmlPullParser parser = new MXParser(); OutputStreamWriter writer; |