com.pusher.java_websocket.server.DefaultWebSocketServerFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-websocket Show documentation
Show all versions of java-websocket Show documentation
The Pusher fork of TooTallNate/Java-Websocket
The newest version!
package com.pusher.java_websocket.server;
import java.net.Socket;
import java.nio.channels.SelectionKey;
import java.nio.channels.SocketChannel;
import java.util.List;
import com.pusher.java_websocket.WebSocketAdapter;
import com.pusher.java_websocket.WebSocketImpl;
import com.pusher.java_websocket.drafts.Draft;
public class DefaultWebSocketServerFactory implements WebSocketServer.WebSocketServerFactory {
@Override
public WebSocketImpl createWebSocket(WebSocketAdapter a, Draft d, Socket s ) {
return new WebSocketImpl( a, d );
}
@Override
public WebSocketImpl createWebSocket( WebSocketAdapter a, List d, Socket s ) {
return new WebSocketImpl( a, d );
}
@Override
public SocketChannel wrapChannel( SocketChannel channel, SelectionKey key ) {
return (SocketChannel) channel;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy