Skip to content

after connect if not receive byte hanging on receive #29

Open

Description

@Vladvladd

Hello!
After connect and send bytes :

const client = new SocketClientTCP(7000, '192.168.1.17');
client.send(hex_string1);

(bytes send perfectly)
server not response and client hanging on command

data=client.receive();

Not go to next command.
How can set timeout on receive function ?
A construction using settimeout loses connection , example:
setTimeout(function(){data=client.receive();},1000);
Error: Cannot use NetLinkSocket that has already been destroyed.

Activity

  1. changed the title [-]after econnect if not receive byte hanging on receive[/-] [+]after connect if not receive byte hanging on receive[/+] on Jun 23, 2021
  2. Vladvladd commented on Jun 24, 2021

    @Vladvladd
    Author

    And if we make construction using settimeout for disconnect after 1 sec, also not interrupted (stopped) receive , example:
    setTimeout(function(){data=client.disconnect();},1000);
    data=client.receive();

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

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