Replies: 1 comment
-
Hello @Nyx2022, in order to connect to an Iris websocket server with other languages than Go, Javascript ,Typescript & Dart you just need to implement the iris/neffos websocket message format in that specific programming language (e.g. Java). Please follow the implementations of Go or Javascript/Typescript or Dart. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i realise iris websocket like this :
const namespace = "default"
// if namespace is empty then simply websocket.Events{...} can be used instead.
var serverEvents = websocket.Namespaces{
namespace: websocket.Events{
websocket.OnNamespaceConnected: func(nsConn *websocket.NSConn, msg websocket.Message) error {
// with
websocket.GetContext
you can retrieve the Iris'Context
.ctx := websocket.GetContext(nsConn.Conn)
}
func testWebSocket() {
app := iris.New()
websocketServer := websocket.New(
gorilla.Upgrader(gorillaWs.Upgrader{CheckOrigin: func(http.Request) bool { return true }}), / DefaultGobwasUpgrader can be used too. */
serverEvents)
}
and i wanna connect the websocket by java,but i tried several ways,the java websocket client can not connect to it at all,so i need the official answers to how to solve it,thanks for ur answers.it'bset to show me java websocket client codes and golang websocket server codes
Beta Was this translation helpful? Give feedback.
All reactions