LucasW
V2EX  ›  问与答

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

  •  
  •   LucasW · Apr 24, 2017 · 1462 views
    This topic created in 3339 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   ·   2869 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 15:31 · PVG 23:31 · LAX 08:31 · JFK 11:31
    ♥ Do have faith in what you're doing.