<commit_before>// Go binding for nanomsg

package nanomsg

// #include <nanomsg/tcp.h>
import "C"

// TcpNoDelay returns the current value of TCP no delay.
func (s *Socket) TcpNoDelay() (bool, error) {
	noDelay, err := s.SockOptInt(C.NN_TCP, C.NN_TCP_NODELAY)
	return noDelay != 0, err
}

// SetTcpNoDelay controls whether the operating system should delay packet
// transmission in hopes of sending fewer packets (Nagle's algorithm).
func (s *Socket) SetTcpNoDelay(noDelay bool) error {
	var value int
	if noDelay {
		value = 1
	}
	return s.SetSockOptInt(C.NN_TCP, C.NN_TCP_NODELAY, value)
}
<commit_msg>tcp: rename functions to TCP, following style guidelines.<commit_after>// Go binding for nanomsg

package nanomsg

// #include <nanomsg/tcp.h>
import "C"

// TCPNoDelay returns the current value of TCP no delay.
func (s *Socket) TCPNoDelay() (bool, error) {
	noDelay, err := s.SockOptInt(C.NN_TCP, C.NN_TCP_NODELAY)
	return noDelay != 0, err
}

// SetTCPNoDelay controls whether the operating system should delay packet
// transmission in hopes of sending fewer packets (Nagle's algorithm).
func (s *Socket) SetTCPNoDelay(noDelay bool) error {
	var value int
	if noDelay {
		value = 1
	}
	return s.SetSockOptInt(C.NN_TCP, C.NN_TCP_NODELAY, value)
}

{'fraction_non_alphanumeric': 0.10446570972886762, 'fraction_numerical': 0.003189792663476874, 'mean_word_length': 4.29535864978903, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4448393', 'n_tokens_mistral': 443, 'n_tokens_neox': 429, 'n_words': 145}