LucasW
V2EX  ›  问与答

Netty 可以像 Socket.io 一样自定义事件么?

  •  
  •   LucasW · Apr 24, 2017 · 1447 views
    This topic created in 3331 days ago, the information mentioned may be changed or developed.
        // 服务端
        socket.on('chat message', function(msg){
        	console.log(msg);
        });
    
        // 客户端
        socket.emit('chat message', 'My message');
    

    请问 Netty 可以定义像 chat message 这种自定义方法么?

    1 replies    2017-04-25 07:49:07 +08:00
    ihuotui
        1
    ihuotui  
       Apr 25, 2017 via iPhone   ❤️ 1
    我来回复吧,这是业务层,自己在 handle 写吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1196 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 17:24 · PVG 01:24 · LAX 10:24 · JFK 13:24
    ♥ Do have faith in what you're doing.