mrniko / netty-socketio

Socket.IO server implemented on Java. Realtime java framework
Apache License 2.0
6.81k stars 1.65k forks source link

NamespaceClient class is not available in OSGi environment #412

Open enflout opened 8 years ago

enflout commented 8 years ago

Hello! I am writing a code for server disconnecting:

public void disconnect(UUID sessionId) {
    NamespaceClient namespaceClient = (NamespaceClient) server.getClient(sessionId);
    namespaceClient.getBaseClient().disconnect();
}

It doesn't work in OSGi-environment because of the package com.corundumstudio.socketio.transport (which contains NamespaceClient) is not exported in MANIFEST.MF. Could you, please, add this export to your parent pom.xml:

com.corundumstudio.socketio.transport;version="${project.version}",

Or teach me how to disconnect in a correct way (I need not only stopping receiving requests, I need a server disconnect).

mrniko commented 8 years ago

What do you want to do? disconnect entire namespace or just a single client?

enflout commented 8 years ago

I just want to disconnect a single client, close his websocket connection.

client.disconnect()

on SocketIOClient sends 41 to client but connection is still alive (and I see pings).