100+ results for 'MSG_PEEK'
Not the results you expected?
AsyncFile.py (git://pkgs.fedoraproject.org/eric) Python · 293 lines
socket_types.hpp (https://github.com/Bes666/evemu_incursion.git) C++ Header · 176 lines
110 const int shutdown_send = SD_SEND;
111 const int shutdown_both = SD_BOTH;
112 const int message_peek = MSG_PEEK;
113 const int message_out_of_band = MSG_OOB;
114 const int message_do_not_route = MSG_DONTROUTE;
154 const int shutdown_send = SHUT_WR;
155 const int shutdown_both = SHUT_RDWR;
156 const int message_peek = MSG_PEEK;
157 const int message_out_of_band = MSG_OOB;
158 const int message_do_not_route = MSG_DONTROUTE;
mod_jaxer_message.h (https://github.com/absynce/Jaxer.git) C Header · 150 lines
application_manager.rb (https://gitlab.com/gitnyasha/zimcreative) Ruby · 140 lines
recvfrom_spec.rb (https://github.com/rklemme/ruby.git) Ruby · 98 lines
socket.d (https://github.com/SiegeLord/Tango-D2.git) D · 498 lines
os_socket.h
(https://bitbucket.org/oregon/oregoncore/)
C Header · 306 lines
✨ Summary
This C header file provides a set of socket-related functions and constants for use in C programs. It defines various socket options, error codes, and protocol families (e.g., IPv4, IPv6) that can be used to create and manage sockets. The code also includes function prototypes for receiving and sending data over sockets with timed waits, allowing for more precise control over timeouts.
This C header file provides a set of socket-related functions and constants for use in C programs. It defines various socket options, error codes, and protocol families (e.g., IPv4, IPv6) that can be used to create and manage sockets. The code also includes function prototypes for receiving and sending data over sockets with timed waits, allowing for more precise control over timeouts.
u_network.c (https://bitbucket.org/peixuan/chromium_r197479_base.git) C · 188 lines
socket.php (https://github.com/philbrookes/Game.git) PHP · 99 lines
80 //Returns true if the remote end is still connected, false if the remote end has hung up.
81 public function isAlive(){
82 $res = @socket_recv($this->sockHandle, $data, 1024, MSG_PEEK);
83 $result = socket_last_error($this->sockHandle);
84 //if bytes received is zero rather than blank, client has hung up
ngx_http_ajp_msg.c (https://github.com/yaoweibin/nginx_ajp_module.git) C · 482 lines
244 ngx_int_t
245 ajp_msg_peek_uint16(ajp_msg_t *msg, uint16_t *rvalue)
246 {
247 uint16_t value;
252 if ((buf->pos + 2) > buf->last) {
253 return ajp_log_overflow(msg, "ajp_msg_peek_uint16");
254 }
265 ngx_int_t
266 ajp_msg_peek_uint8(ajp_msg_t *msg, u_char *rvalue)
267 {
268 if ((msg->buf->pos + 1) > msg->buf->last) {
socket.h (https://gitlab.com/gl-xinshouyong/1407-mifi-customer-tmp) C Header · 221 lines
23 #define NL_SOCK_PASSCRED (1<<1)
24 #define NL_OWN_PORT (1<<2)
25 #define NL_MSG_PEEK (1<<3)
26 #define NL_NO_AUTO_ACK (1<<4)
151 /**
152 * Enable use of MSG_PEEK when reading from socket
153 * @arg sk Netlink socket.
154 */
155 static inline void nl_socket_enable_msg_peek(struct nl_sock *sk)
156 {
157 sk->s_flags |= NL_MSG_PEEK;
auth-pwd.c (https://github.com/Shirk/zsrelay.git) C · 259 lines
vchi.h (https://github.com/ThomasHabets/linux.git) C Header · 159 lines
owsl_tcp.c (https://github.com/VoxOx/VoxOx.git) C · 330 lines
constdefs.h (https://github.com/GunioRobot/rhodes.git) C Header · 1788 lines
tcpstream.cpp (https://github.com/azboul/multitheftauto.git) C++ · 114 lines
test1.c (https://gitlab.com/o1s2/selflrrn) C · 208 lines
socket.d (https://github.com/soywiz/pspemu.git) D · 670 lines
sockets.md (https://github.com/vyzo/gerbil.git) Markdown · 581 lines
socket_util.c (https://bitbucket.org/freebsd/freebsd-base.git) C · 75 lines
socket.scm (https://code.google.com/p/sagittarius-scheme/) Scheme · 92 lines
LSOCK.cpp
(https://bitbucket.org/oregon/oregoncore/)
C++ · 184 lines
✨ Summary
This C++ code implements a Unix domain socket (UDS) class, ACE_LSOCK
, which provides functions for sending and receiving file descriptors over a UDS connection. The send_handle
function sends an open file descriptor to the peer, while the recv_handle
function receives an open file descriptor from the peer. The code uses various operating system APIs, such as sendmsg
and recvmsg
, to implement these functions.
This C++ code implements a Unix domain socket (UDS) class, ACE_LSOCK
, which provides functions for sending and receiving file descriptors over a UDS connection. The send_handle
function sends an open file descriptor to the peer, while the recv_handle
function receives an open file descriptor from the peer. The code uses various operating system APIs, such as sendmsg
and recvmsg
, to implement these functions.
133 ssize_t nbytes = ACE_OS::recvmsg (this->get_handle (),
134 &recv_msg,
135 MSG_PEEK);
137 if (nbytes != ACE_INVALID_HANDLE)
142 {
143 #if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG)
144 // Close down the socket that was returned by the MSG_PEEK.
145 cmsghdr *cmsgptr = (cmsghdr *) cmsgbuf;
146 ACE_HANDLE * ph = (ACE_HANDLE *) CMSG_DATA (cmsgptr);
network.c (https://bitbucket.org/amontero/tinyproxy.git) C · 238 lines
socket.d (https://github.com/fawzi/oldTango.git) D · 113 lines
sendrecv.c (https://github.com/colinbenner/ocaml-llvm.git) C · 141 lines
linux_socket.h (https://github.com/okuoku/freebsd-head.git) C Header · 119 lines
sock.pyx (https://gitlab.com/lely_industries/io) Cython · 469 lines
udp_connection.cpp (https://github.com/nanomo/network-traffic-generator.git) C++ · 207 lines
socket.d (https://github.com/mirrors/gcc.git) D · 1894 lines
_-select.c (https://github.com/MewX/Psiphon3-for-Linux.git) C · 297 lines
listener_filter_fuzzer.cc (https://github.com/envoyproxy/envoy.git) C++ · 124 lines
loopudp.c (https://gitlab.com/peter__barnes/work) C · 210 lines
IO.pm (https://github.com/dwimperl/perl-5.12.3.0.git) Perl · 261 lines
25 MORE:
26 for(
27 $peer = recv($_[0],$buf,$n,MSG_PEEK);
28 defined $peer;
29 $peer = recv($_[0],$buf,$n<<=1,MSG_PEEK)
77 # Check we can read the whole element
78 goto error
79 unless defined($peer = recv($_[0],$buf,$len,MSG_PEEK));
81 if ($len > length $buf) {
90 }
92 if ($_[2] & MSG_PEEK) {
93 $_[1] = substr($buf,0,$len);
94 }
common.cpp (https://github.com/silviu/quill.git) C++ · 236 lines
socket.h (https://github.com/managarm/mlibc.git) C Header · 283 lines
sslinux.pas
(http://transmisson-remote-gui.googlecode.com/svn/trunk/)
Pascal · 1315 lines
✨ Summary
This is a set of functions for working with IPv6 addresses and networks in the Delphi programming language. It includes functions for converting between different representations of IPv6 addresses, such as text and binary, as well as functions for checking whether an address is within a given network or subnet.
This is a set of functions for working with IPv6 addresses and networks in the Delphi programming language. It includes functions for converting between different representations of IPv6 addresses, such as text and binary, as well as functions for checking whether an address is within a given network or subnet.
SocketMessage.java (https://github.com/jnr/jnr-constants.git) Java · 50 lines
5 MSG_OOB(0x1L),
6 // MSG_DONTWAIT not defined
7 MSG_PEEK(0x2L),
8 MSG_DONTROUTE(0x4L),
9 // MSG_EOR not defined
37 java.util.Map<SocketMessage, String> map = new java.util.EnumMap<SocketMessage, String>(SocketMessage.class);
38 map.put(MSG_OOB, "MSG_OOB");
39 map.put(MSG_PEEK, "MSG_PEEK");
40 map.put(MSG_DONTROUTE, "MSG_DONTROUTE");
41 map.put(MSG_WAITALL, "MSG_WAITALL");
blackadder.cpp (https://github.com/tsilochr/blackadder.git) C++ · 278 lines
msg.c (https://quake.svn.sourceforge.net/svnroot/quake) C · 382 lines
posix.h (https://github.com/phoenix-rtos/phoenix-rtos-kernel.git) C Header · 182 lines
Link.cpp (https://github.com/DOCGroup/ATCD.git) C++ · 330 lines
ByteStringSpec.hs (git://github.com/haskell/network.git) Haskell · 308 lines
socket.h (https://bitbucket.org/devzero2000/openvswitch.git) C Header · 133 lines
clients.c (https://github.com/zcoder/netio.git) C · 410 lines
socket_io.cpp (https://github.com/suhailsherif/MySQL-5.1-.git) C++ · 332 lines
SocketInProvider.h (https://github.com/nterman/nbites.git) C Header · 157 lines
datagram.c (https://github.com/tiwai/sound.git) C · 199 lines
send_spec.rb (https://github.com/abdollar/ruby.git) Ruby · 220 lines
45 t = Thread.new do
46 client = @server.accept
47 peek_data = client.recv(6, Socket::MSG_PEEK)
48 data = client.recv(6)
49 client.recv(10) # this recv is important
53 t.status.should_not be_nil
55 @socket.send('helloU', Socket::MSG_PEEK | Socket::MSG_OOB).should == 6
56 @socket.shutdown # indicate, that we are done sending
heartbleed_example.c (https://github.com/atxsinn3r/VulnCases.git) C · 159 lines
ph.t (http://perl5005.googlecode.com/svn/trunk/) Perl · 97 lines
16 AF_INET AF_LAT AF_MAX AF_NBS AF_NIT AF_NS AF_OSI AF_OSINET AF_PUP
17 AF_SNA AF_UNIX AF_UNSPEC AF_X25 MSG_DONTROUTE MSG_MAXIOVLEN MSG_OOB
18 MSG_PEEK PF_802 PF_APPLETALK PF_CCITT PF_CHAOS PF_DATAKIT PF_DECnet PF_DLI
19 PF_ECMA PF_GOSIP PF_HYLINK PF_IMPLINK PF_INET PF_LAT PF_MAX PF_NBS PF_NIT
20 PF_NS PF_OSI PF_OSINET PF_PUP PF_SNA PF_UNIX PF_UNSPEC PF_X25 SOCK_DGRAM
net.c (https://github.com/ncsurobotics/svr.git) C · 146 lines
poll.cc (https://bitbucket.org/pizzafactory/binutils.git) C++ · 158 lines
kernel_footprint.c (https://github.com/robots/APRS.git) C · 96 lines
inet.c (https://gitlab.com/nobody-mb/minecraft-classic-old-bot) C · 174 lines
send_spec.rb (https://github.com/Hank923/ironruby.git) Ruby · 69 lines
socket.h (https://github.com/shattered/linux-m68k.git) C Header · 147 lines
receive-data-from-socket.md (https://github.com/huy/linux_kernel_study.git) Markdown · 147 lines
getpeereid.c (https://bitbucket.org/devzero2000/openldap.git) C · 220 lines
connection.c (https://github.com/q3k/uhub.git) C · 328 lines
SocketSerialized.cpp (https://github.com/Krozark/cpp-Socket.git) C++ · 373 lines
glibconfig.h (https://github.com/SLIBIO/SLib.git) C Header · 212 lines
websocketproxy.py (https://github.com/bcwaldon/nova.git) Python · 95 lines
SSL_SOCK_Stream.inl (https://gitlab.com/mohsencs/SunWellCore) C++ Header · 364 lines
socket.h (https://gitlab.com/abidin24/sortix) C Header · 189 lines
socket.d (https://github.com/wolfwood/djehuty.git) D · 300 lines
socket.c (https://github.com/scala-native/scala-native.git) C · 203 lines
AsyncFile.py (git://pkgs.fedoraproject.org/eric) Python · 296 lines
web.py (https://github.com/paraboul/noVNC.git) Python · 53 lines
socket_non_stream.cc (https://github.com/google/gvisor.git) C++ · 337 lines
137 memset(received_data, 0, sizeof(received_data));
138 ASSERT_THAT(RetryEINTR(recv)(sockets->second_fd(), received_data,
139 sizeof(received_data), MSG_PEEK),
140 SyscallSucceedsWithValue(sizeof(sent_data1)));
141 EXPECT_EQ(0, memcmp(sent_data1, received_data, sizeof(sent_data1)));
255 }
257 // This test tests reading from a socket with MSG_TRUNC | MSG_PEEK and a zero
258 // length receive buffer. The user should be able to get the message length
259 // without reading data off the socket.
280 // The syscall succeeds returning the full size of the message on the socket.
281 ASSERT_THAT(RetryEINTR(recvmsg)(sockets->second_fd(), &peek_msg,
282 MSG_TRUNC | MSG_PEEK),
283 SyscallSucceedsWithValue(sizeof(sent_data)));
test_websocketproxy.py (https://github.com/SiggyBar/emscripten.git) Python · 136 lines
sockets.constants.html (https://github.com/cue-taro/emacs-setting-files.git) HTML · 2766 lines
SOCKET.py (https://bitbucket.org/__wp__/mb-linux-msli.git) Python · 145 lines
ENServer.cpp (https://github.com/brucetsao/86Duino.git) C++ · 227 lines
udp.cpp (https://github.com/MaxBelkov/visualsyslog.git) C++ · 633 lines
socket_wrapper.cpp (https://gitlab.com/envieidoc/tomato) C++ · 208 lines
netwrap_socket.c (https://github.com/OpenFastPath/ofp.git) C · 676 lines
constants_spec.rb (https://github.com/benburkert/rubyspec.git) Ruby · 64 lines
checkSock.cpp (https://github.com/ALTIBASE/altibase.git) C++ · 53 lines
conn.go (https://github.com/snapcore/snapd.git) Go · 175 lines
mod.rs (https://github.com/chromium/chromium.git) Rust · 103 lines
Makefile.PL (https://bitbucket.org/__wp__/mb-linux-msli.git) Perl · 68 lines
socket.h (https://github.com/bigboss-ps3dev/PSL1GHT.git) C Header · 121 lines
TCPSocket.cpp (https://github.com/necrophcodr/Passion.git) C++ · 146 lines
SOCKET.py (https://bitbucket.org/__wp__/mb-linux-msli.git) Python · 93 lines
peek.c (https://github.com/rillian/firefox.git) C · 360 lines
6 /*
7 * A test case for the PR_MSG_PEEK flag of PR_Recv().
8 *
9 * Test both blocking and non-blocking sockets.
54 memset(buf, 0, sizeof(buf));
55 nbytes = PR_Recv(sock, buf, recv_amount[i],
56 PR_MSG_PEEK, PR_INTERVAL_NO_TIMEOUT);
57 if (-1 == nbytes) {
58 fprintf(stderr, "PR_Recv failed\n");
74 memset(buf, 0, sizeof(buf));
75 nbytes = PR_Recv(sock, buf, recv_amount[i],
76 PR_MSG_PEEK, PR_INTERVAL_NO_TIMEOUT);
77 if (-1 == nbytes) {
78 fprintf(stderr, "PR_Recv failed\n");
WinThread_Client.cpp (http://sandblastplanning.googlecode.com/svn/trunk/) C++ · 90 lines
SOCKET.py (https://github.com/swolchok/dspython.git) Python · 106 lines
sockets-constants.ads (https://github.com/samueltardieu/adasockets.git) Ada · 84 lines
recvfrom_spec.rb (https://github.com/zenspider/ruby.git) Ruby · 123 lines
message_flags.hpp (git://github.com/dietmarkuehl/kuhllib.git) C++ Header · 74 lines
routineutil.cpp (https://github.com/tencent-wechat/phxsql.git) C++ · 157 lines
socket.scala (https://github.com/scala-native/scala-native.git) Scala · 238 lines
http.c (https://github.com/itanko/last.fm-lib.git) C · 207 lines
cups-2.0.2-poll-CPU-loop-STR-4605.patch (https://gitlab.com/rindeal/gentoo-cvs-history-archive) Patch · 48 lines
socket.h (https://github.com/freemint/freemint.git) C Header · 112 lines
ecore_audio_pulse_ml.c (https://github.com/Enlightenment/efl.git) C · 355 lines
socket.h (https://repo.or.cz/AquilaOS.git) C Header · 85 lines
ngx_http_php_keepalive.c (https://github.com/rryqszq4/ngx_php7.git) C · 219 lines
send_spec.rb (https://github.com/bjeanes/rubyspec.git) Ruby · 82 lines
43 t = Thread.new do
44 client = @server.accept
45 peek_data = client.recv(6, Socket::MSG_PEEK)
46 data = client.recv(6)
47 client.recv(10) # this recv is important
51 t.status.should_not be_nil
53 @socket.send('helloU', Socket::MSG_PEEK | Socket::MSG_OOB).should == 6
54 @socket.shutdown # indicate, that we are done sending