LucasW
V2EX  ›  问与答

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

  •  
  •   LucasW · Apr 24, 2017 · 1651 views
    This topic created in 3497 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
    ihuotui
    Apr 25, 2017 via iPhone❤️1
    1
    我来回复吧,这是业务层,自己在 handle 写吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2320 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 02:38 · PVG 10:38 · LAX 18:38 · JFK 21:38
    ♥ Do have faith in what you're doing.