Skip to content

Error Report:5.3.2 socket command server #1

@sj82516

Description

@sj82516

Hi,
when I used the sample code , the server side could receive the request but nothing responded;
I found out this section would cause directly return without result

if (data.toString().indexOf('\n') == -1) {
// 沒收到換行字元,代表命令還沒全部傳送完成
return;
}

I just deleted it and got success result.
By the way, what is the purpose of using

var cmdStr = '';
cmdStr += data.toString();

I deleted it and it still worked.
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions