Skip to content

The effect of setting true or false on setNoDelay is the same #213

Open
@DaDa-He9

Description

@DaDa-He9
  <TouchableOpacity
                        onPress={() => {
                            if (client) {
                                client.setNoDelay(true);
                                const hugeData = 'h'.repeat(40 * 1024);
                                console.log('TcpSocketDemo: tcp send data start:' + new Date().getTime());
                                client.write(hugeData, 'utf8');
                            } else {
                                sendMessage('TcpSocketDemo:tcpClient is null');
                            }
                        }}
                        style={styles.moduleButton}>
                        <Text style={styles.buttonText}>setNoDelay_true</Text>
                    </TouchableOpacity>
                    <TouchableOpacity
                        onPress={() => {
                            if (client) {
                                client.setNoDelay(false);
                                const hugeData = 'h'.repeat(40 * 1024);
                                console.log('TcpSocketDemo: tcp send data start:' + new Date().getTime());
                                client.write(hugeData, 'utf8');
                            } else {
                                sendMessage('TcpSocketDemo:tcpClient is null');
                            }
                        }}
                        style={styles.moduleButton}>
                        <Text style={styles.buttonText}>setNoDelay_false</Text>
                    </TouchableOpacity>

This is my code. I called setNoDelay and set true and false respectively to transfer data, but the effect is the same for both

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions