commit
aa3b3d4a5b
@ -16,17 +16,11 @@
|
||||
package io.netty.handler.codec.http.websocketx;
|
||||
|
||||
import java.net.URI;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Map;
|
||||
|
||||
import io.netty.buffer.ChannelBuffer;
|
||||
import io.netty.buffer.ChannelBuffers;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.handler.codec.base64.Base64;
|
||||
import io.netty.handler.codec.http.HttpResponse;
|
||||
import io.netty.util.CharsetUtil;
|
||||
|
||||
/**
|
||||
* Base class for web socket client handshake implementations
|
||||
@ -111,7 +105,7 @@ public abstract class WebSocketClientHandshaker {
|
||||
|
||||
/**
|
||||
* Begins the opening handshake
|
||||
*
|
||||
*
|
||||
* @param channel
|
||||
* Channel
|
||||
*/
|
||||
@ -119,7 +113,7 @@ public abstract class WebSocketClientHandshaker {
|
||||
|
||||
/**
|
||||
* Validates and finishes the opening handshake initiated by {@link #handshake}}.
|
||||
*
|
||||
*
|
||||
* @param channel
|
||||
* Channel
|
||||
* @param response
|
||||
|
@ -15,18 +15,12 @@
|
||||
*/
|
||||
package io.netty.handler.codec.http.websocketx;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import io.netty.buffer.ChannelBuffer;
|
||||
import io.netty.buffer.ChannelBuffers;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.handler.codec.base64.Base64;
|
||||
import io.netty.handler.codec.http.HttpRequest;
|
||||
import io.netty.util.CharsetUtil;
|
||||
|
||||
/**
|
||||
* Base class for server side web socket opening and closing handshakes
|
||||
@ -41,7 +35,7 @@ public abstract class WebSocketServerHandshaker {
|
||||
|
||||
/**
|
||||
* Constructor specifying the destination web socket location
|
||||
*
|
||||
*
|
||||
* @param version
|
||||
* the protocol version
|
||||
* @param webSocketUrl
|
||||
@ -92,7 +86,7 @@ public abstract class WebSocketServerHandshaker {
|
||||
|
||||
/**
|
||||
* Performs the opening handshake
|
||||
*
|
||||
*
|
||||
* @param channel
|
||||
* Channel
|
||||
* @param req
|
||||
@ -102,7 +96,7 @@ public abstract class WebSocketServerHandshaker {
|
||||
|
||||
/**
|
||||
* Performs the closing handshake
|
||||
*
|
||||
*
|
||||
* @param channel
|
||||
* Channel
|
||||
* @param frame
|
||||
@ -112,7 +106,7 @@ public abstract class WebSocketServerHandshaker {
|
||||
|
||||
/**
|
||||
* Selects the first matching supported sub protocol
|
||||
*
|
||||
*
|
||||
* @param requestedSubprotocols
|
||||
* CSV of protocols to be supported. e.g. "chat, superchat"
|
||||
* @return First matching supported sub protocol. Null if not found.
|
||||
|
@ -17,9 +17,6 @@ package io.netty.example.http.websocketx.autobahn;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.logging.ConsoleHandler;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import io.netty.bootstrap.ServerBootstrap;
|
||||
import io.netty.channel.socket.nio.NioServerSocketChannelFactory;
|
||||
|
@ -17,23 +17,20 @@ package io.netty.example.http.websocketx.server;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.logging.ConsoleHandler;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import io.netty.bootstrap.ServerBootstrap;
|
||||
import io.netty.channel.socket.nio.NioServerSocketChannelFactory;
|
||||
|
||||
/**
|
||||
* A HTTP server which serves Web Socket requests at:
|
||||
*
|
||||
*
|
||||
* http://localhost:8080/websocket
|
||||
*
|
||||
*
|
||||
* Open your browser at http://localhost:8080/, then the demo page will be loaded and a Web Socket connection will be
|
||||
* made automatically.
|
||||
*
|
||||
*
|
||||
* This server illustrates support for the different web socket specification versions and will work with:
|
||||
*
|
||||
*
|
||||
* <ul>
|
||||
* <li>Safari 5+ (draft-ietf-hybi-thewebsocketprotocol-00)
|
||||
* <li>Chrome 6-13 (draft-ietf-hybi-thewebsocketprotocol-00)
|
||||
|
@ -17,23 +17,20 @@ package io.netty.example.http.websocketx.sslserver;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.logging.ConsoleHandler;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import io.netty.bootstrap.ServerBootstrap;
|
||||
import io.netty.channel.socket.nio.NioServerSocketChannelFactory;
|
||||
|
||||
/**
|
||||
* A HTTP server which serves Web Socket requests at:
|
||||
*
|
||||
*
|
||||
* https://localhost:8081/websocket
|
||||
*
|
||||
*
|
||||
* Open your browser at https://localhost:8081/, then the demo page will be loaded and a Web Socket connection will be
|
||||
* made automatically.
|
||||
*
|
||||
*
|
||||
* This server illustrates support for the different web socket specification versions and will work with:
|
||||
*
|
||||
*
|
||||
* <ul>
|
||||
* <li>Safari 5+ (draft-ietf-hybi-thewebsocketprotocol-00)
|
||||
* <li>Chrome 6-13 (draft-ietf-hybi-thewebsocketprotocol-00)
|
||||
|
@ -17,7 +17,6 @@ package io.netty.channel.sctp;
|
||||
|
||||
import io.netty.channel.ReceiveBufferSizePredictor;
|
||||
import io.netty.channel.ReceiveBufferSizePredictorFactory;
|
||||
import io.netty.channel.socket.SocketChannelConfig;
|
||||
|
||||
/**
|
||||
* A {@link io.netty.channel.sctp.SctpChannelConfig} for a NIO SCTP/IP {@link io.netty.channel.sctp.SctpChannel}.
|
||||
|
@ -18,9 +18,6 @@ package io.netty.channel.sctp;
|
||||
import com.sun.nio.sctp.Association;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.socket.SocketChannel;
|
||||
import io.netty.channel.socket.SocketChannelConfig;
|
||||
import io.netty.channel.socket.nio.NioSocketChannelConfig;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
|
@ -15,7 +15,6 @@
|
||||
*/
|
||||
package io.netty.testsuite.transport;
|
||||
|
||||
import com.sun.nio.sctp.SctpChannel;
|
||||
import com.sun.nio.sctp.SctpServerChannel;
|
||||
import io.netty.bootstrap.ClientBootstrap;
|
||||
import io.netty.channel.ChannelFactory;
|
||||
@ -40,7 +39,6 @@ import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
|
@ -23,8 +23,6 @@ import io.netty.channel.*;
|
||||
import io.netty.channel.sctp.SctpClientSocketChannelFactory;
|
||||
import io.netty.channel.sctp.SctpFrame;
|
||||
import io.netty.channel.sctp.SctpServerSocketChannelFactory;
|
||||
import io.netty.channel.sctp.codec.SctpFrameDecoder;
|
||||
import io.netty.channel.sctp.codec.SctpFrameEncoder;
|
||||
import io.netty.testsuite.util.SctpSocketAddresses;
|
||||
import io.netty.util.internal.ExecutorUtil;
|
||||
import org.junit.AfterClass;
|
||||
|
@ -16,7 +16,6 @@
|
||||
package io.netty.testsuite.transport.sctp;
|
||||
|
||||
import io.netty.channel.ChannelFactory;
|
||||
import io.netty.channel.sctp.SctpClientSocketChannelFactory;
|
||||
import io.netty.channel.sctp.SctpServerSocketChannelFactory;
|
||||
import io.netty.testsuite.transport.AbstractSocketServerBootstrapTest;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user