Skip to content

Socket.on's callback function has not the same data in web and jsb #1201

Open
@kawais

Description

@kawais

server code:
socket.emit('message', {'message': 'hello xx'});

client code:
socket.on('message', function(data){
cc.log(data);
// in web will print Object {message: "hello xx"}
// in jsb will print JS: {"name":"message","args":[{"message":"hello xx"}]}
});

Activity

pandamicro

pandamicro commented on Dec 31, 2014

@pandamicro
Contributor

@samuele3hu Please check it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @pandamicro@kawais

        Issue actions

          Socket.on's callback function has not the same data in web and jsb · Issue #1201 · cocos2d/cocos2d-js