Problem when I want to send string data

#1

Hi

When I want to send string data, this Exception appears to me.

java.lang.NullPointerException: Attempt to invoke virtual method ‘void de.tavendo.autobahn.WebSocketWriter.forward(java.lang.Object)’ on a null object reference

at de.tavendo.autobahn.WebSocketConnection.sendTextMessage(WebSocketConnection.java:137)

Line 137 of WebSocketConnection.java is:

public void sendTextMessage(String payload) {
    this.mWriter.forward(new TextMessage(payload));
}

How can I send?

Thanks
0 Likes