PageRenderTime 1177ms queryTime 148ms sortTime 209ms getByIdsTime 80ms findMatchingLines 40ms

100+ results results for 'socket repo:outbred/libimobiledevice-win32' (1177 ms)

Not the results you expected?
NioSelectorPool.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 304 lines
                    
141     * @param buf ByteBuffer - the buffer containing the data, we will write as long as <code>(buf.hasRemaining()==true)</code>
                    
142     * @param socket SocketChannel - the socket to write data to
                    
143     * @param selector Selector - the selector to use for blocking, if null then a busy write will be initiated
                    
201     * @param buf ByteBuffer - the buffer containing the data, we will read as until we have read at least one byte or we timed out
                    
202     * @param socket SocketChannel - the socket to write data to
                    
203     * @param selector Selector - the selector to use for blocking, if null then a busy read will be initiated
                    
206     * @throws EOFException if read returns -1
                    
207     * @throws SocketTimeoutException if the read times out
                    
208     * @throws IOException if an IO Exception occurs in the underlying socket logic
                    
209     */
                    
210    public int read(ByteBuffer buf, NioChannel socket, Selector selector, long readTimeout) throws IOException {
                    
211        return read(buf,socket,selector,readTimeout,true);
                    
218     * @param buf ByteBuffer - the buffer containing the data, we will read as until we have read at least one byte or we timed out
                    
219     * @param socket SocketChannel - the socket to write data to
                    
220     * @param selector Selector - the selector to use for blocking, if null then a busy read will be initiated
                    
                
RecordingInputStream.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 369 lines
                    
30import java.io.InputStream;
                    
31import java.net.SocketException;
                    
32import java.net.SocketTimeoutException;
                    
211                }
                    
212            } catch (SocketTimeoutException e) {
                    
213                // A socket timeout is just a transient problem, meaning
                    
220                if (logger.isLoggable(Level.FINE)) {
                    
221                    logger.log(Level.FINE, "socket timeout", e); 
                    
222                }
                    
224                recordingOutputStream.checkLimits();
                    
225            } catch (SocketException se) {
                    
226                throw se;
                    
                
winrt_ssocket_service_base.hpp https://gitlab.com/cdeclare/intcrypt | C++ Header | 357 lines
                    
1//
                    
2// detail/winrt_ssocket_service_base.hpp
                    
3// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    
10
                    
11#ifndef BOOST_ASIO_DETAIL_WINRT_SSOCKET_SERVICE_BASE_HPP
                    
12#define BOOST_ASIO_DETAIL_WINRT_SSOCKET_SERVICE_BASE_HPP
                    
24#include <boost/asio/io_service.hpp>
                    
25#include <boost/asio/socket_base.hpp>
                    
26#include <boost/asio/detail/addressof.hpp>
                    
27#include <boost/asio/detail/buffer_sequence_adapter.hpp>
                    
28#include <boost/asio/detail/socket_types.hpp>
                    
29#include <boost/asio/detail/winrt_async_manager.hpp>
                    
42  // The native type of a socket.
                    
43  typedef Windows::Networking::Sockets::StreamSocket^ native_handle_type;
                    
44
                    
                
workhorse_spec.rb https://gitlab.com/Ben305/gitlab-ce | Ruby | 454 lines
                    
99
                    
100  describe '.terminal_websocket' do
                    
101    def terminal(ca_pem: nil)
                    
125    context 'without ca_pem' do
                    
126      subject { described_class.terminal_websocket(terminal) }
                    
127
                    
131    context 'with ca_pem' do
                    
132      subject { described_class.terminal_websocket(terminal(ca_pem: "foo")) }
                    
133
                    
                
CDProtocol.java https://gitlab.com/Moylle/CDAPI | Java | 481 lines
                    
14	public AfterVerificationDelegate afterVerification;
                    
15	Socket socket;
                    
16	InputStream inputStream;
                    
42	
                    
43	public CDProtocol(Socket socket, int maxLength, int buf_capacity, boolean incomming) throws Exception
                    
44	{
                    
46	}
                    
47	public CDProtocol(Socket socket, int maxLength, int buf_capacity, boolean incomming, String hashedKeyWord, DataInputObject dio, RawDataInputObject dioRaw, boolean useBigEndian) throws Exception
                    
48	{
                    
48	{
                    
49		this.socket = socket;
                    
50		this.inputStream = socket.getInputStream();
                    
272	{
                    
273		return this.socket != null && this.socket.isConnected();
                    
274	}
                    
                
record-handler.js https://gitlab.com/jasonparser/deepstream.io | JavaScript | 369 lines
                    
111 *
                    
112 * @param   {SocketWrapper} socketWrapper the socket that send the request
                    
113 * @param   {Object} message parsed and validated message
                    
133 *
                    
134 * @param   {SocketWrapper} socketWrapper the socket that send the request
                    
135 * @param   {Object} message parsed and validated message
                    
171 * @param {Object} record
                    
172 * @param {SocketWrapper} socketWrapper the socket that send the request
                    
173 *
                    
204 * 
                    
205 * @param   {SocketWrapper} socketWrapper the socket that send the request
                    
206 * @param   {Object} message parsed and validated message
                    
346 *
                    
347 * @param   {SocketWrapper} socketWrapper the socket that send the request
                    
348 * @param   {Object} message parsed and validated message
                    
                
client.js https://gitlab.com/oytunistrator/x3dom | JavaScript | 495 lines
                    
53
                    
54    "socketTimeout": function(test){
                    
55        var client = simplesmtp.connect(PORT_NUMBER, false, {socketTimeout: 500});
                    
                
process.c https://gitlab.com/oytunistrator/io.js | C | 524 lines
                    
114
                    
115int uv__make_socketpair(int fds[2], int flags) {
                    
116#if defined(__linux__)
                    
121
                    
122  if (socketpair(AF_UNIX, SOCK_STREAM | UV__SOCK_CLOEXEC | flags, 0, fds) == 0)
                    
123    return 0;
                    
135
                    
136  if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds))
                    
137    return -errno;
                    
202    else
                    
203      return uv__make_socketpair(fds, 0);
                    
204
                    
                
ClientFTP.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 179 lines
                    
54    protected StringBuilder controlConversation;
                    
55    protected Socket dataSocket;
                    
56
                    
71     *            the path of the file to retrieve
                    
72     * @return the socket to read data from, or null if server says not found,
                    
73     *         permission denied, etc
                    
76     */
                    
77    public Socket openDataConnection(int command, String path)
                    
78    throws IOException {
                    
79        try {
                    
80            dataSocket = _openDataConnection_(command, path);
                    
81            if (dataSocket != null) {
                    
82                recordAdditionalInfo("Opened data connection to "
                    
83                        + dataSocket.getInetAddress().getHostAddress() + ":"
                    
84                        + dataSocket.getPort());
                    
                
Krb5AndCertsSslSocketConnector.Krb5SslFilter.html https://gitlab.com/essere.lab.public/qualitas.class-corpus | HTML | 144 lines
                    
6<TITLE>
                    
7Uses of Class org.apache.hadoop.security.Krb5AndCertsSslSocketConnector.Krb5SslFilter (Hadoop 1.1.2 API)
                    
8</TITLE>
                    
17    if (location.href.indexOf('is-external=true') == -1) {
                    
18        parent.document.title="Uses of Class org.apache.hadoop.security.Krb5AndCertsSslSocketConnector.Krb5SslFilter (Hadoop 1.1.2 API)";
                    
19    }
                    
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
                    
42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../org/apache/hadoop/security/Krb5AndCertsSslSocketConnector.Krb5SslFilter.html" title="class in org.apache.hadoop.security"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD>
                    
43  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD>
                    
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
                    
61  <A HREF="../../../../../index.html?org/apache/hadoop/security//class-useKrb5AndCertsSslSocketConnector.Krb5SslFilter.html" target="_top"><B>FRAMES</B></A>  &nbsp;
                    
62&nbsp;<A HREF="Krb5AndCertsSslSocketConnector.Krb5SslFilter.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
                    
83<H2>
                    
84<B>Uses of Class<br>org.apache.hadoop.security.Krb5AndCertsSslSocketConnector.Krb5SslFilter</B></H2>
                    
85</CENTER>
                    
                
ColumbaServer.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 251 lines
                    
22import java.io.PrintWriter;
                    
23import java.net.ServerSocket;
                    
24import java.net.Socket;
                    
40/**
                    
41 * Opens a server socket to manage multiple sessions of Columba capable of
                    
42 * passing commands to the main session.
                    
81	 */
                    
82	protected ServerSocket serverSocket;
                    
83
                    
102				try {
                    
103					serverSocket.close();
                    
104
                    
135				try {
                    
136					serverSocket = new ServerSocket(port);
                    
137
                    
                
RuntimeEnabledFeatures.cpp https://gitlab.com/x33n/phantomjs | C++ | 213 lines
                    
36#include "SharedWorkerRepository.h"
                    
37#include "WebSocket.h"
                    
38
                    
143
                    
144#if ENABLE(WEB_SOCKETS)
                    
145bool RuntimeEnabledFeatures::webSocketEnabled()
                    
146{
                    
147    return WebSocket::isAvailable();
                    
148}
                    
                
best-practice-security.md https://gitlab.com/HDworley/expressjs.com | Markdown | 205 lines
                    
27
                    
28您可能熟悉 Secure Socket Layer (SSL) 加密。[TLS 就是 SSL 後繼的演進](https://msdn.microsoft.com/en-us/library/windows/desktop/aa380515(v=vs.85).aspx)。換句話說,如果您之前使用 SSL,請考量升級至 TLS。一般而言,我們建議由 Nginx 來處理 TLS。如需有關在 Nginx(和其他伺服器)上配置 TLS 的適當參考資料,請參閱 [Recommended Server Configurations (Mozilla Wiki)](https://wiki.mozilla.org/Security/Server_Side_TLS#Recommended_Server_Configurations)。
                    
29
                    
                
logger.cc https://gitlab.com/jonnialva90/iridium-browser | C++ | 366 lines
                    
139
                    
140void Logger::LogNewSocketEvent(const CastSocket& cast_socket) {
                    
141  DCHECK(thread_checker_.CalledOnValidThread());
                    
148  aggregated_socket_event.set_endpoint_id(ip.back());
                    
149  aggregated_socket_event.set_channel_auth_type(cast_socket.channel_auth() ==
                    
150                                                        CHANNEL_AUTH_TYPE_SSL
                    
300
                    
301  std::deque<proto::SocketEvent>& socket_events = it->second->socket_events;
                    
302  if (socket_events.size() >= kMaxEventsPerSocket) {
                    
326        log.add_aggregated_socket_event();
                    
327    new_aggregated_socket_event->CopyFrom(it->second->aggregated_socket_event);
                    
328
                    
328
                    
329    const std::deque<SocketEvent>& socket_events = it->second->socket_events;
                    
330    for (std::deque<SocketEvent>::const_iterator socket_event_it =
                    
                
58-debug_spec.js https://gitlab.com/farm-assistant/nodered | JavaScript | 338 lines
                    
19var helper = require("../../helper.js");
                    
20var WebSocket = require('ws');
                    
21
                    
46            var n1 = helper.getNode("n1");
                    
47            websocket_test(function() {
                    
48                n1.emit("input", {payload:"test"});
                    
62            var count = 0;
                    
63            websocket_test(function() {
                    
64                n1.emit("input", {payload:"test"});
                    
91            var n1 = helper.getNode("n1");
                    
92            websocket_test(function() {
                    
93                n1.emit("input", {payload:"test"});
                    
106            var n1 = helper.getNode("n1");
                    
107            websocket_test(function() {
                    
108                n1.emit("input", {payload:"test", foo:"bar"});
                    
                
MemoryFileSystem.js https://gitlab.com/limorelv/trelloApp | JavaScript | 225 lines
                    
57			isFIFO: falseFn,
                    
58			isSocket: falseFn
                    
59		};
                    
67			isFIFO: falseFn,
                    
68			isSocket: falseFn
                    
69		};
                    
                
vhci_sysfs.c https://gitlab.com/webhaikal/SenseiOneplus3 | C | 252 lines
                    
41	 * output example:
                    
42	 * prt sta spd dev socket           local_busid
                    
43	 * 000 004 000 000         c5a7bb80 1-2.3
                    
45	 *
                    
46	 * IP address can be retrieved from a socket pointer address by looking
                    
47	 * up /proc/net/{tcp,tcp6}. Also, a userland program may remember a
                    
50	out += sprintf(out,
                    
51		       "prt sta spd bus dev socket           local_busid\n");
                    
52
                    
175	struct vhci_device *vdev;
                    
176	struct socket *socket;
                    
177	int sockfd = 0;
                    
225	vdev->speed         = speed;
                    
226	vdev->ud.tcp_socket = socket;
                    
227	vdev->ud.status     = VDEV_ST_NOTASSIGNED;
                    
                
auth.go https://gitlab.com/vantruong/GolangRestAPI | Go | 467 lines
                    
97	for socket.cachedNonce == "" && socket.dead == nil {
                    
98		debugf("Socket %p to %s: waiting for nonce", socket, socket.addr)
                    
99		socket.gotNonce.Wait()
                    
131		}
                    
132		debugf("Socket %p to %s: nonce unmarshalled: %#v", socket, socket.addr, result)
                    
133		if result.Code == 13390 {
                    
180
                    
181	debugf("Socket %p to %s: login: db=%q user=%q", socket, socket.addr, cred.Source, cred.Username)
                    
182
                    
198	} else {
                    
199		debugf("Socket %p to %s: login successful", socket, socket.addr)
                    
200	}
                    
461			copy(socket.logout[i:], socket.logout[i+1:])
                    
462			socket.logout = socket.logout[:len(socket.logout)-1]
                    
463			return true
                    
                
tcp_probe.c https://gitlab.com/abhishekr700/ZE550KL_KERNEL | C | 260 lines
                    
24#include <linux/kprobes.h>
                    
25#include <linux/socket.h>
                    
26#include <linux/tcp.h>
                    
                
shepherd.scm https://gitlab.com/janneke/guix | Scheme | 157 lines
                    
102                          (format #f "/run/user/~a" (getuid)))
                    
103                      "/shepherd/socket"))
                    
104              (let ((log-dir (or (getenv "XDG_LOG_HOME")
                    
128              (format #f "/run/user/~a" (getuid)))
                    
129          "/shepherd/socket"))
                    
130        #$(reload-configuration-gexp config)
                    
                
simple-error-model.cc https://gitlab.com/pmaddi/cs433 | C++ | 173 lines
                    
115
                    
116  OnOffHelper onoff ("ns3::UdpSocketFactory",
                    
117    Address (InetSocketAddress (i3i2.GetAddress (1), port)));
                    
125  // Create an optional packet sink to receive these packets
                    
126  PacketSinkHelper sink ("ns3::UdpSocketFactory",
                    
127    Address (InetSocketAddress (Ipv4Address::GetAny (), port)));
                    
133  onoff.SetAttribute ("Remote", 
                    
134                      AddressValue (InetSocketAddress (i1i2.GetAddress (0), port)));
                    
135  apps = onoff.Install (c.Get (3));
                    
140  sink.SetAttribute ("Local", 
                    
141                     AddressValue (InetSocketAddress (Ipv4Address::GetAny (), port)));
                    
142  apps = sink.Install (c.Get (1));
                    
                
Cocos2dxHttpURLConnection.java https://gitlab.com/gasabr/flappy-test | Java | 403 lines
                    
131
                    
132            httpsURLConnection.setSSLSocketFactory(context.getSocketFactory());
                    
133        } catch (Exception e) {
                    
                
server.js https://gitlab.com/vasuvanka/hphrs | JavaScript | 448 lines
                    
48 * @param {(Buffer|string)} [options.sslPass=null] String or buffer containing the certificate password (needs to have a mongod server with ssl support, 2.4 or higher)
                    
49 * @param {object} [options.socketOptions=null] Socket options
                    
50 * @param {boolean} [options.socketOptions.autoReconnect=false] Reconnect on error.
                    
50 * @param {boolean} [options.socketOptions.autoReconnect=false] Reconnect on error.
                    
51 * @param {boolean} [options.socketOptions.noDelay=true] TCP Socket NoDelay option.
                    
52 * @param {number} [options.socketOptions.keepAlive=0] TCP KeepAlive on the socket with a X ms delay before start.
                    
53 * @param {number} [options.socketOptions.connectTimeoutMS=0] TCP Connection timeout setting
                    
54 * @param {number} [options.socketOptions.socketTimeoutMS=0] TCP Socket timeout setting
                    
55 * @param {number} [options.reconnectTries=30] Server attempt to reconnect #times
                    
105
                    
106  // Socket options passed down
                    
107  if(options.socketOptions) {
                    
113    if(options.socketOptions.socketTimeoutMS) {
                    
114      clonedOptions.socketTimeout = options.socketOptions.socketTimeoutMS;
                    
115    }
                    
                
ConnectionConfig.js https://gitlab.com/ralexs04/shop-List-w | JavaScript | 201 lines
                    
14  this.localAddress       = options.localAddress;
                    
15  this.socketPath         = options.socketPath;
                    
16  this.user               = options.user || undefined;
                    
                
package-summary.html https://gitlab.com/essere.lab.public/qualitas.class-corpus | HTML | 205 lines
                    
91<TR BGCOLOR="white" CLASS="TableRowColor">
                    
92<TD WIDTH="15%"><B><A HREF="../../../../../org/objectweb/cjdbc/common/net/AuthenticatedServerSocketFactory.html" title="class in org.objectweb.cjdbc.common.net">AuthenticatedServerSocketFactory</A></B></TD>
                    
93<TD>This class defines a AuthenticatedSSLSocketFactory
                    
99<TR BGCOLOR="white" CLASS="TableRowColor">
                    
100<TD WIDTH="15%"><B><A HREF="../../../../../org/objectweb/cjdbc/common/net/AuthenticatedSocketFactory.html" title="class in org.objectweb.cjdbc.common.net">AuthenticatedSocketFactory</A></B></TD>
                    
101<TD>This class defines a AuthenticatedSSLSocketFactory
                    
107<TR BGCOLOR="white" CLASS="TableRowColor">
                    
108<TD WIDTH="15%"><B><A HREF="../../../../../org/objectweb/cjdbc/common/net/RMISSLClientSocketFactory.html" title="class in org.objectweb.cjdbc.common.net">RMISSLClientSocketFactory</A></B></TD>
                    
109<TD>This class defines a RMISSLClientSocketFactory</TD>
                    
111<TR BGCOLOR="white" CLASS="TableRowColor">
                    
112<TD WIDTH="15%"><B><A HREF="../../../../../org/objectweb/cjdbc/common/net/RMISSLServerSocketFactory.html" title="class in org.objectweb.cjdbc.common.net">RMISSLServerSocketFactory</A></B></TD>
                    
113<TD>This class defines a RMISSLServerSocketFactory</TD>
                    
115<TR BGCOLOR="white" CLASS="TableRowColor">
                    
116<TD WIDTH="15%"><B><A HREF="../../../../../org/objectweb/cjdbc/common/net/SocketFactoryFactory.html" title="class in org.objectweb.cjdbc.common.net">SocketFactoryFactory</A></B></TD>
                    
117<TD>This class defines a SocketFactory</TD>
                    
                
main.py https://gitlab.com/essere.lab.public/qualitas.class-corpus | Python | 305 lines
                    
87        optParser.add_option(
                    
88            "--debug-socket",
                    
89            action='store_true',
                    
89            action='store_true',
                    
90            dest="debug_socket",
                    
91            default=None
                    
229            kwargs['port'] = options.port
                    
230        if options.debug_socket is not None:
                    
231            kwargs['debug_socket'] = sys.stderr
                    
                
index.js https://gitlab.com/aelharrak/react | JavaScript | 222 lines
                    
114		if (options.timeout) {
                    
115			req.once('socket', function(socket) {
                    
116				reqTimeout = setTimeout(function() {
                    
                
FtpInitialConnectTimeoutTest.java https://gitlab.com/matticala/apache-camel | Java | 171 lines
                    
48    /**
                    
49     * Create the answer for the socket factory that causes a SocketTimeoutException to occur in connect.
                    
50     */
                    
50     */
                    
51    private static class SocketAnswer implements Answer<Socket> {
                    
52
                    
54        public Socket answer(InvocationOnMock invocation) throws Throwable {
                    
55            final Socket socket = spy(new Socket());
                    
56            final AtomicBoolean timeout = new AtomicBoolean();
                    
128
                    
129    private SocketFactory createSocketFactory() throws IOException {
                    
130        SocketFactory socketFactory = mock(SocketFactory.class);
                    
130        SocketFactory socketFactory = mock(SocketFactory.class);
                    
131        when(socketFactory.createSocket()).thenAnswer(new SocketAnswer());
                    
132        return socketFactory;
                    
                
NSOutputStream_socket.mm https://gitlab.com/goolic/WinObjC | Objective C++ | 184 lines
                    
16
                    
17static BOOL socketHasSpaceAvailable(id socket) {
                    
18   NSSelectSet* selectSet = [[[NSSelectSet alloc] init] autorelease];
                    
28@implementation NSOutputStream_socket : NSStream
                    
29    /* annotate with type */ -(id) initWithSocket:(id)socket streamStatus:(DWORD)status {
                    
30        _delegate=self;
                    
131            if(sslHandler==nil)
                    
132                return socketHasSpaceAvailable(_socket);
                    
133            else {
                    
136                else if ( socketHasSpaceAvailable(_socket)) {
                    
137                    [sslHandler transferOneBufferFromSSLToSocket:_socket];
                    
138                }
                    
161
                    
162            [sslHandler runWithSocket:_socket];
                    
163            [_inputSource setSelectEventMask:[_inputSource selectEventMask] | NSSelectWriteEvent];
                    
                
WebsocketComponentAutoConfiguration.java https://gitlab.com/matticala/apache-camel | Java | 129 lines
                    
16 */
                    
17package org.apache.camel.component.atmosphere.websocket.springboot;
                    
18
                    
23import org.apache.camel.CamelContext;
                    
24import org.apache.camel.component.atmosphere.websocket.WebsocketComponent;
                    
25import org.apache.camel.spi.ComponentCustomizer;
                    
57        WebsocketComponentConfiguration.class})
                    
58public class WebsocketComponentAutoConfiguration {
                    
59
                    
60    private static final Logger LOGGER = LoggerFactory
                    
61            .getLogger(WebsocketComponentAutoConfiguration.class);
                    
62    @Autowired
                    
79    @ConditionalOnMissingBean(WebsocketComponent.class)
                    
80    public WebsocketComponent configureWebsocketComponent() throws Exception {
                    
81        WebsocketComponent component = new WebsocketComponent();
                    
                
gl_rst.c https://gitlab.com/rychly/rk3026-linux-sources | C | 473 lines
                    
189 *        1. registering for reset callbacks
                    
190 *        2. initialize netlink socket 
                    
191 *
                    
226 * @brief This routine is responsible for 
                    
227 *        1. uninitialize netlink socket 
                    
228 *        2. deregistering for reset callbacks
                    
304/*!
                    
305 * @brief This routine send out message via netlink socket
                    
306 *
                    
                
rpc_manager.cpp https://gitlab.com/andreicristianpetcu/popcorn-time | C++ | 522 lines
                    
32
                    
33#include "libtorrent/socket.hpp"
                    
34
                    
167rpc_manager::rpc_manager(node_id const& our_id
                    
168	, routing_table& table, udp_socket_interface* sock)
                    
169	: m_pool_allocator(observer_size, 10)
                    
                
util.h https://gitlab.com/bsd1993/android_kernel_zte_x9180 | C Header | 268 lines
                    
69#include <sys/poll.h>
                    
70#include <sys/socket.h>
                    
71#include <sys/ioctl.h>
                    
                
Readme.md https://gitlab.com/hemantr/NetBeansProjects | Markdown | 364 lines
                    
2
                    
3Socket.IO is a Node.JS project that makes WebSockets and realtime possible in
                    
4all browsers. It also enhances WebSockets by providing built-in multiplexing,
                    
82
                    
83io.sockets.on('connection', function (socket) {
                    
84  io.sockets.emit('this', { will: 'be received by everyone' });
                    
283
                    
284io.sockets.on('connection', function (socket) {
                    
285  socket.join('justin bieber fans');
                    
300
                    
301io.sockets.on('connection', function (socket) {
                    
302  socket.on('message', function () { });
                    
331io.configure(function () {
                    
332  io.set('transports', ['websocket', 'flashsocket', 'xhr-polling']);
                    
333});
                    
                
mainwindow.cpp https://gitlab.com/midiPlayer/midiPlayer | C++ | 225 lines
                    
27
                    
28MainWindow::MainWindow(WebSocketServer* ws) :
                    
29    WebSocketServerProvider(ws),
                    
                
app.py https://gitlab.com/johannes.valbjorn/CallRoulette | Python | 214 lines
                    
79        except asyncio.TimeoutError:
                    
80            log.warning('Timeout reading from socket')
                    
81            self.close()
                    
104
                    
105class WebSocketHandler:
                    
106    def __init__(self):
                    
110    def __call__(self, request):
                    
111        ws = web.WebSocketResponse(protocols=('callroulette',))
                    
112        ws.start(request)
                    
191    app.router.add_route('GET', '/', LazyFileHandler(INDEX_FILE, 'text/html'))
                    
192    app.router.add_route('GET', '/ws', WebSocketHandler())
                    
193    app.router.add_route('GET', '/static/{path:.*}', StaticFilesHandler(STATIC_FILES))
                    
                
tcp.c https://gitlab.com/deadnem/Singularity | C | 326 lines
                    
55/* doing it this way avoids calling tcp_sk() */
                    
56void rds_tcp_nonagle(struct socket *sock)
                    
57{
                    
66
                    
67void rds_tcp_tune(struct socket *sock)
                    
68{
                    
93
                    
94void rds_tcp_restore_callbacks(struct socket *sock,
                    
95			       struct rds_tcp_connection *tc)
                    
120 */
                    
121void rds_tcp_set_callbacks(struct socket *sock, struct rds_connection *conn)
                    
122{
                    
133
                    
134	/* accepted sockets need our listen data ready undone */
                    
135	if (sock->sk->sk_data_ready == rds_tcp_listen_data_ready)
                    
                
rfcomm.h https://gitlab.com/deadnem/Singularity | C Header | 366 lines
                    
156	struct list_head list;
                    
157	struct socket   *sock;
                    
158	struct timer_list timer;
                    
277
                    
278/* ---- RFCOMM sockets ---- */
                    
279struct sockaddr_rc {
                    
308
                    
309int  rfcomm_init_sockets(void);
                    
310void rfcomm_cleanup_sockets(void);
                    
                
tcp.h https://gitlab.com/mrimp/linaro-toolchains | C Header | 301 lines
                    
66# include <sys/types.h>
                    
67# include <sys/socket.h>
                    
68
                    
243
                    
244/* For TCP_MD5SIG socket option.  */
                    
245#define TCP_MD5SIG_MAXKEYLEN	80
                    
255
                    
256/* For socket repair options.  */
                    
257struct tcp_repair_opt
                    
271
                    
272/* For cookie transactions socket options.  */
                    
273#define TCP_COOKIE_MIN		8		/*  64-bits */
                    
                
JSchChannelsSupport.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 340 lines
                    
245                    if (RemoteStatistics.COLLECT_STATISTICS) {
                    
246                        newSession.setSocketFactory(MeasurableSocketFactory.getInstance());
                    
247                    }
                    
                
kqueue.go https://gitlab.com/auchalet/mattermost | Go | 503 lines
                    
187		// Don't watch sockets.
                    
188		if fi.Mode()&os.ModeSocket == os.ModeSocket {
                    
189			return "", nil
                    
                
probe.js https://gitlab.com/Guy1394/gaia | JavaScript | 181 lines
                    
56          } else {
                    
57            // if the error was socket-level or something, let it pass
                    
58            // through untouched
                    
72          } else {
                    
73            // if the error was socket-level or something, let it pass
                    
74            // through untouched
                    
116  //      request: Pop3Client.Request (if applicable),
                    
117  //      exception: (A socket error, if available),
                    
118  //    };
                    
127  }
                    
128  // If there was a socket exception and the exception looks like
                    
129  // a security exception, note that it was a security-related
                    
                
select_reactor.ipp https://gitlab.com/cdeclare/intcrypt | C++ Header | 315 lines
                    
29#include <boost/asio/detail/signal_blocker.hpp>
                    
30#include <boost/asio/detail/socket_ops.hpp>
                    
31
                    
100
                    
101int select_reactor::register_descriptor(socket_type,
                    
102    select_reactor::per_descriptor_data&)
                    
107int select_reactor::register_internal_descriptor(
                    
108    int op_type, socket_type descriptor,
                    
109    select_reactor::per_descriptor_data&, reactor_op* op)
                    
118
                    
119void select_reactor::move_descriptor(socket_type,
                    
120    select_reactor::per_descriptor_data&,
                    
124
                    
125void select_reactor::start_op(int op_type, socket_type descriptor,
                    
126    select_reactor::per_descriptor_data&, reactor_op* op,
                    
                
SmtpTransport.php https://gitlab.com/shubam39/CakeTooDoo | PHP | 373 lines
                    
89 * @return array
                    
90 * @throws SocketException
                    
91 */
                    
196				if (!$this->_smtpSend(base64_encode($this->_config['username']), '334')) {
                    
197					throw new SocketException(__d('cake_dev', 'SMTP server did not accept the username.'));
                    
198				}
                    
199				if (!$this->_smtpSend(base64_encode($this->_config['password']), '235')) {
                    
200					throw new SocketException(__d('cake_dev', 'SMTP server did not accept the password.'));
                    
201				}
                    
331	protected function _generateSocket() {
                    
332		$this->_socket = new CakeSocket($this->_config);
                    
333	}
                    
368			}
                    
369			throw new SocketException(__d('cake_dev', 'SMTP Error: %s', $response));
                    
370		}
                    
                
Message.h https://gitlab.com/edelmaks/iOS-iphoneheaders | C Header | 147 lines
                    
82#import <Message/MFStream.h>
                    
83#import <Message/_MFSocket.h>
                    
84#import <Message/MFConnection.h>
                    
                
data_use_measurement_unittest.cc https://gitlab.com/jonnialva90/iridium-browser | C++ | 151 lines
                    
13#include "net/base/request_priority.h"
                    
14#include "net/socket/socket_test_util.h"
                    
15#include "net/url_request/url_request.h"
                    
42                             net::MockRead("Test Content")};
                    
43    net::StaticSocketDataProvider socket_data(reads, arraysize(reads), nullptr,
                    
44                                              0);
                    
44                                              0);
                    
45    socket_factory_->AddSocketDataProvider(&socket_data);
                    
46
                    
76                             net::MockRead("Test Content")};
                    
77    net::StaticSocketDataProvider socket_data(reads, arraysize(reads), nullptr,
                    
78                                              0);
                    
78                                              0);
                    
79    socket_factory_->AddSocketDataProvider(&socket_data);
                    
80
                    
                
xt_TPROXY.c https://gitlab.com/deadnem/Singularity | C | 432 lines
                    
84 *
                    
85 * Returns the listener socket if there's one, the TIME_WAIT socket if
                    
86 * no such listener is found, or NULL if the TCP header is incomplete.
                    
102		/* SYN to a TIME_WAIT socket, we'd rather redirect it
                    
103		 * to a listener socket if there's one */
                    
104		struct sock *sk2;
                    
227 * @par:	Iptables target parameters.
                    
228 * @sk:		The TIME_WAIT TCP socket found by the lookup.
                    
229 *
                    
229 *
                    
230 * We have to handle SYN packets arriving to TIME_WAIT sockets
                    
231 * differently: instead of reopening the connection we should rather
                    
236 *
                    
237 * Returns the listener socket if there's one, the TIME_WAIT socket if
                    
238 * no such listener is found, or NULL if the TCP header is incomplete.
                    
                
svr-x11fwd.c https://gitlab.com/Orvillo/Tomato | C | 241 lines
                    
64
                    
65	/* create listening socket */
                    
66	fd = socket(PF_INET, SOCK_STREAM, 0);
                    
84
                    
85	/* listener code will handle the socket now.
                    
86	 * No cleanup handler needed, since listener_remove only happens
                    
103
                    
104/* accepts a new X11 socket */
                    
105/* returns DROPBEAR_FAILURE or DROPBEAR_SUCCESS */
                    
235		/* otherwise it was an error we don't know about */
                    
236		dropbear_log(LOG_DEBUG, "failed to bind x11 socket");
                    
237		break;
                    
                
io.hpp https://gitlab.com/wilane/mesos | C++ Header | 189 lines
                    
98 *     A failure will be returned if an error is detected.
                    
99 *     If writing to a socket or pipe, an error will be returned if the
                    
100 *     the read end of the socket or pipe has been closed.
                    
147 * TODO(hartem): This function will currently return an error if fd
                    
148 * is not a socket descriptor. Chnages need to be made to support
                    
149 * ordinary files and pipes as well.
                    
150 *
                    
151 * @param fd socket descriptor.
                    
152 * @param data buffer to which peek'd bytes will be copied.
                    
178 *
                    
179 * @param fd socket descriptor.
                    
180 * @param limit maximum number of bytes to peek.
                    
                
ip.h https://gitlab.com/Krzyzanowski_Pawel/biosignal_gen | C Header | 463 lines
                    
2 * INET		An implementation of the TCP/IP protocol suite for the LINUX
                    
3 *		operating system.  INET is implemented using the  BSD Socket
                    
4 *		interface as the means of communication with the user level.
                    
                
connect.hpp https://gitlab.com/Teo-Mirror/AtomicGameEngine | C++ Header | 428 lines
                    
52template <typename Protocol, typename SocketService, typename Iterator>
                    
53inline Iterator connect(basic_socket<Protocol, SocketService>& s,
                    
54    Iterator begin, asio::error_code& ec)
                    
77    typename Iterator, typename ConnectCondition>
                    
78Iterator connect(basic_socket<Protocol, SocketService>& s,
                    
79    Iterator begin, ConnectCondition connect_condition)
                    
260  //private:
                    
261    basic_socket<Protocol, SocketService>& socket_;
                    
262    Iterator iter_;
                    
324    void (asio::error_code, Iterator))
                    
325async_connect(basic_socket<Protocol, SocketService>& s,
                    
326    Iterator begin, ASIO_MOVE_ARG(ComposedConnectHandler) handler)
                    
375    void (asio::error_code, Iterator))
                    
376async_connect(basic_socket<Protocol, SocketService>& s,
                    
377    Iterator begin, ConnectCondition connect_condition,
                    
                
c-api.rst https://gitlab.com/jonnialva90/iridium-browser | ReStructuredText | 364 lines
                    
110
                    
111  * `PPB_TCPSocket <pepper_stable/c/struct_p_p_b___t_c_p_socket__1__1.html>`__
                    
112
                    
116
                    
117  * `PPB_UDPSocket <pepper_stable/c/struct_p_p_b___u_d_p_socket__1__0.html>`__
                    
118
                    
138
                    
139  * `PPB_WebSocket <pepper_stable/c/struct_p_p_b___web_socket__1__0.html>`__
                    
140
                    
322
                    
323  * `ppb_tcp_socket.h <pepper_stable/c/ppb__tcp__socket_8h.html>`__
                    
324
                    
326
                    
327  * `ppb_udp_socket.h <pepper_stable/c/ppb__udp__socket_8h.html>`__
                    
328
                    
                
guile-fibers-wait-for-io-readiness.patch https://gitlab.com/janneke/guix | Patch | 346 lines
                    
62+Make an operation that will succeed with no values when the input
                    
63+port @var{port} becomes readable.  For passive sockets, this operation
                    
64+succeeds when a connection becomes available.
                    
277+;;    This is tested with a pipe (read & write)
                    
278+;;    and a listening socket (read, or accept in this case).
                    
279+;;
                    
284+;;
                    
285+;;    These are again tested with a pipe and a listening socket
                    
286+;;
                    
288+
                    
289+(define (make-listening-socket)
                    
290+  (let ((server (socket PF_INET SOCK_DGRAM 0)))
                    
293+
                    
294+(let ((s (make-listening-socket)))
                    
295+  (assert-run-fibers-returns (#t)
                    
                
arcdevice.h https://gitlab.com/felipe_artur/linux-stable | C Header | 389 lines
                    
2 * INET         An implementation of the TCP/IP protocol suite for the LINUX
                    
3 *              operating system.  NET  is implemented using the  BSD Socket
                    
4 *              interface as the means of communication with the user level.
                    
                
addr.c https://gitlab.com/bsd1993/android_kernel_zte_x9180 | C | 360 lines
                    
3 *
                    
4 * Convert socket addresses to presentation addresses and universal
                    
5 * addresses, and vice versa.
                    
119 * rpc_ntop - construct a presentation address in @buf
                    
120 * @sap: socket address
                    
121 * @buf: construction area
                    
235 * @buflen: length of presentation address in bytes
                    
236 * @sap: buffer into which to plant socket address
                    
237 * @salen: size of buffer in bytes
                    
238 *
                    
239 * Returns the size of the socket address if successful; otherwise
                    
240 * zero is returned.
                    
241 *
                    
242 * Plants a socket address in @sap and returns the size of the
                    
243 * socket address, if successful.  Returns zero if an error
                    
                
audio_renderer_host.h https://gitlab.com/jonnialva90/iridium-browser | C Header | 315 lines
                    
37
                    
38// A SyncSocket pair is used to signal buffer readiness between processes.
                    
39
                    
194  // Complete the process of creating an audio stream. This will set up the
                    
195  // shared memory or shared socket in low latency mode and send the
                    
196  // NotifyStreamCreated message to the peer.
                    
                
socket_option.hpp https://gitlab.com/Sarahma/Installation-Requirements | C++ Header | 568 lines
                    
1//
                    
2// detail/socket_option.hpp
                    
3// ~~~~~~~~~~~~~~~~~~~~~~~~
                    
10
                    
11#ifndef BOOST_ASIO_IP_DETAIL_SOCKET_OPTION_HPP
                    
12#define BOOST_ASIO_IP_DETAIL_SOCKET_OPTION_HPP
                    
21#include <stdexcept>
                    
22#include <boost/asio/detail/socket_ops.hpp>
                    
23#include <boost/asio/detail/socket_types.hpp>
                    
32namespace detail {
                    
33namespace socket_option {
                    
34
                    
90
                    
91  // Get the level of the socket option.
                    
92  template <typename Protocol>
                    
                
iptunnel.c https://gitlab.com/vg/netsukuku-c | C | 475 lines
                    
79	strncpy(ifr.ifr_name, dev, IFNAMSIZ);
                    
80	fd = socket(AF_INET, SOCK_DGRAM, 0);
                    
81	err = ioctl(fd, SIOCGIFINDEX, &ifr);
                    
98	strncpy(ifr.ifr_name, dev, IFNAMSIZ);
                    
99	fd = socket(AF_INET, SOCK_DGRAM, 0);
                    
100	err = ioctl(fd, SIOCGIFHWADDR, &ifr);
                    
116	ifr.ifr_ifindex = idx;
                    
117	fd = socket(AF_INET, SOCK_DGRAM, 0);
                    
118	err = ioctl(fd, SIOCGIFNAME, &ifr);
                    
136	ifr.ifr_ifru.ifru_data = (void *) p;
                    
137	fd = socket(AF_INET, SOCK_DGRAM, 0);
                    
138	err = ioctl(fd, SIOCGETTUNNEL, &ifr);
                    
158	ifr.ifr_ifru.ifru_data = (void *) p;
                    
159	fd = socket(AF_INET, SOCK_DGRAM, 0);
                    
160	err = ioctl(fd, cmd, &ifr);
                    
                
config-win32.h https://gitlab.com/thomasphillips3/node | C Header | 385 lines
                    
91
                    
92/* Define if you have the closesocket function. */
                    
93#define HAVE_CLOSESOCKET 1
                    
100
                    
101/* Define if you have the ioctlsocket function. */
                    
102#define HAVE_IOCTLSOCKET 1
                    
103
                    
104/* Define if you have a working ioctlsocket FIONBIO function. */
                    
105#define HAVE_IOCTLSOCKET_FIONBIO 1
                    
125/* Define to the type of arg 1 for recv. */
                    
126#define RECV_TYPE_ARG1 SOCKET
                    
127
                    
143/* Define to the type of arg 1 for recvfrom. */
                    
144#define RECVFROM_TYPE_ARG1 SOCKET
                    
145
                    
                
agent.py https://gitlab.com/Blueprint-Marketing/newrelic-plugin-agent | Python | 339 lines
                    
10import requests
                    
11import socket
                    
12import sys
                    
76        """
                    
77        return {'host': socket.gethostname(),
                    
78                'pid': os.getpid(),
                    
                
WS.js git://github.com/martensms/lycheeJS.git | JavaScript | 640 lines
                    
14	/*
                    
15	 * WebSocket Framing Protocol
                    
16	 *
                    
                
callback.c https://gitlab.com/rychly/nst-linux-sources | C | 257 lines
                    
84		/*
                    
85		 * Listen for a request on the socket
                    
86		 */
                    
163out_err:
                    
164	dprintk("NFS: Couldn't create callback socket or server thread; "
                    
165		"err = %d\n", ret);
                    
                
gNET.cpp https://gitlab.com/xKIVIx/My_Game | C++ | 260 lines
                    
10	{
                    
11		LogSend(LOG_CRITICAL_ERROR, "gNET", "Can`t init socket API");
                    
12		return;
                    
13	}
                    
14	// init output socket
                    
15	output_sock_ = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
                    
15	output_sock_ = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
                    
16	if (output_sock_ == INVALID_SOCKET)
                    
17	{
                    
17	{
                    
18		LogSend(LOG_CRITICAL_ERROR, "gNET", "Can`t init output socket");
                    
19		WSACleanup();
                    
21	}
                    
22	// init input socket
                    
23	input_sock_ = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
                    
                
cardbus.c https://gitlab.com/rychly/nst-linux-sources | C | 252 lines
                    
86    cards.  The "result" that is used externally is the cb_cis_virt
                    
87    pointer in the struct pcmcia_socket structure.
                    
88    
                    
90
                    
91static void cb_release_cis_mem(struct pcmcia_socket * s)
                    
92{
                    
100
                    
101static int cb_setup_cis_mem(struct pcmcia_socket * s, struct resource *res)
                    
102{
                    
129
                    
130int read_cb_mem(struct pcmcia_socket * s, int space, u_int addr, u_int len, void *ptr)
                    
131{
                    
209
                    
210int __ref cb_alloc(struct pcmcia_socket * s)
                    
211{
                    
                
server.py https://gitlab.com/oytunistrator/openface | Python | 360 lines
                    
21
                    
22from autobahn.twisted.websocket import WebSocketServerProtocol, \
                    
23    WebSocketServerFactory
                    
93
                    
94class OpenFaceServerProtocol(WebSocketServerProtocol):
                    
95
                    
108    def onOpen(self):
                    
109        print("WebSocket connection open.")
                    
110
                    
151    def onClose(self, wasClean, code, reason):
                    
152        print("WebSocket connection closed: {0}".format(reason))
                    
153
                    
355
                    
356    factory = WebSocketServerFactory("ws://localhost:9000", debug=False)
                    
357    factory.protocol = OpenFaceServerProtocol
                    
                
udp.c https://gitlab.com/tlevine/DragonFlyBSD | C | 336 lines
                    
30#include <sys/types.h>
                    
31#include <sys/socket.h>
                    
32#include <netinet/in.h>
                    
233
                    
234  p->fd = socket(PF_INET, SOCK_DGRAM, 0);
                    
235  if (p->fd >= 0) {
                    
235  if (p->fd >= 0) {
                    
236    log_Printf(LogDEBUG, "%s: Opened udp socket %s\n", p->link.name,
                    
237               p->name.full);
                    
243  } else
                    
244    log_Printf(LogWARN, "%s: socket: %s\n", p->name.full, strerror(errno));
                    
245
                    
282  } else {
                    
283    /* See if we're a connected udp socket */
                    
284    struct stat st;
                    
                
GameKitServices-Symbols.h https://gitlab.com/edelmaks/iOS-iphoneheaders | C Header | 421 lines
                    
118_GKVoiceChatServiceErrorDomain
                    
119_GetLocalIFIndexForBoundSocket
                    
120_GetLocalInterfaceListWithOptions
                    
402_snprintf
                    
403_socket
                    
404_sscanf
                    
                
curl_ntlm_wb.c https://gitlab.com/taler/gnurl | C | 431 lines
                    
70#elif defined(HAVE_CLOSESOCKET_CAMEL)
                    
71#  define sclose_nolog(x)  CloseSocket((x))
                    
72#else
                    
77{
                    
78  if(conn->ntlm_auth_hlpr_socket != CURL_SOCKET_BAD) {
                    
79    sclose(conn->ntlm_auth_hlpr_socket);
                    
79    sclose(conn->ntlm_auth_hlpr_socket);
                    
80    conn->ntlm_auth_hlpr_socket = CURL_SOCKET_BAD;
                    
81  }
                    
115{
                    
116  curl_socket_t sockfds[2];
                    
117  pid_t child_pid;
                    
128  /* Return if communication with ntlm_auth already set up */
                    
129  if(conn->ntlm_auth_hlpr_socket != CURL_SOCKET_BAD ||
                    
130     conn->ntlm_auth_hlpr_pid)
                    
                
mysqli_driver.php https://gitlab.com/nicolerey/PPLI-payroll | PHP | 484 lines
                    
108	{
                    
109		// Do we have a socket path?
                    
110		if ($this->hostname[0] === '/')
                    
113			$port = NULL;
                    
114			$socket = $this->hostname;
                    
115		}
                    
121			$port = empty($this->port) ? NULL : $this->port;
                    
122			$socket = NULL;
                    
123		}
                    
134
                    
135		return $mysqli->real_connect($hostname, $this->username, $this->password, $this->database, $port, $socket, $client_flags)
                    
136			? $mysqli : FALSE;
                    
                
xfrm.h https://gitlab.com/webhaikal/SenseiOneplus3 | C Header | 526 lines
                    
6/* All of the structures in this file may not change size as they are
                    
7 * passed into the kernel from userspace via netlink sockets.
                    
8 */
                    
                
ConvertingEncoderDecoderSupportTests.java https://gitlab.com/zouxc/spring-framework | Java | 316 lines
                    
16
                    
17package org.springframework.web.socket.adapter.standard;
                    
18
                    
19import java.nio.ByteBuffer;
                    
20import javax.websocket.DecodeException;
                    
21import javax.websocket.Decoder;
                    
21import javax.websocket.Decoder;
                    
22import javax.websocket.EncodeException;
                    
23import javax.websocket.Encoder;
                    
40import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
                    
41import org.springframework.web.socket.ContextLoaderTestUtils;
                    
42
                    
46/**
                    
47 * Test for {@link org.springframework.web.socket.adapter.standard.ConvertingEncoderDecoderSupport}.
                    
48 *
                    
                
FileTransfer.cpp https://gitlab.com/cnchyan/beebeep | C++ | 377 lines
                    
153
                    
154void FileTransfer::incomingConnection( qintptr socket_descriptor )
                    
155{
                    
159  m_peers.append( upload_peer );
                    
160  setupPeer( upload_peer, socket_descriptor );
                    
161}
                    
162
                    
163void FileTransfer::setupPeer( FileTransferPeer* transfer_peer, int socket_descriptor )
                    
164{
                    
185
                    
186  transfer_peer->setConnectionDescriptor( socket_descriptor );
                    
187  int delay = Random::number( 1, 9 ) * 100;
                    
                
PltSsdp.h https://gitlab.com/sloshedpuppie/LetsGoRetro | C Header | 389 lines
                    
112                               const char*        nt,
                    
113                               NPT_UdpSocket&     socket,
                    
114                               bool               notify, 
                    
120                                   const char*        nt,
                    
121                                   NPT_UdpSocket&     socket,
                    
122                                   bool               notify);
                    
207    PLT_SsdpInitMulticastIterator(NPT_UdpMulticastSocket* socket) :
                    
208        m_Socket(socket) {}
                    
209
                    
363public:
                    
364    PLT_SsdpSearchTask(NPT_UdpSocket*                  socket,
                    
365                       PLT_SsdpSearchResponseListener* listener, 
                    
385    bool                            m_Repeat;
                    
386    NPT_UdpSocket*                  m_Socket;
                    
387};
                    
                
bpf.c https://gitlab.com/tlevine/DragonFlyBSD | C | 421 lines
                    
3
                    
4/* BPF socket interface code, originally contributed by Archie Cobbs. */
                    
5
                    
105	/*
                    
106	 * Use raw socket for unicast send.
                    
107	 */
                    
107	 */
                    
108	if ((sock = socket(AF_INET, SOCK_RAW, IPPROTO_UDP)) == -1)
                    
109		error("socket(SOCK_RAW): %m");
                    
288		/*
                    
289		 * DragonFly's raw socket expects ip_len/ip_off
                    
290		 * in host byte order.
                    
                
IFSListAttrsRep.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 437 lines
                    
35  static final int DEVICE_BLOCK = 7;
                    
36  static final int SOCKET = 8;
                    
37
                    
                
run_java_tests.py https://gitlab.com/jonnialva90/iridium-browser | Python | 334 lines
                    
120  if debug:
                    
121    transport = 'dt_socket'
                    
122    if util.IsWindows():
                    
                
topology.c https://gitlab.com/felipe_artur/linux-stable | C | 503 lines
                    
107			else
                    
108				topo->socket_id = socket->id;
                    
109			smp_cpu_set_polarization(lcpu + i, tl_core->pp);
                    
141{
                    
142	struct mask_info *socket = &socket_info;
                    
143	struct mask_info *book = &book_info;
                    
154		case 1:
                    
155			socket = socket->next;
                    
156			socket->id = tle->container.id;
                    
170{
                    
171	struct mask_info *socket = &socket_info;
                    
172	struct mask_info *book = &book_info;
                    
183		case 0:
                    
184			socket = add_cpus_to_mask(&tle->cpu, book, socket, 1);
                    
185			break;
                    
                
TCPTransportHelper.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 660 lines
                    
65	
                    
66	public TCPTransportHelper( SocketChannel _channel ) {
                    
67		channel = _channel;
                    
72	{
                    
73		return( new InetSocketAddress( channel.socket().getInetAddress(), channel.socket().getPort()));
                    
74	}
                    
324					channel.socket().setTcpNoDelay(false);
                    
325				} catch (SocketException e)
                    
326				{
                    
417			
                    
418			throw new IOException( "end of stream on socket read" );
                    
419		}
                    
564
                    
565	public SocketChannel getSocketChannel(){  return channel; }
                    
566
                    
                
README.md https://gitlab.com/blocknotary/IonicInterviews | Markdown | 383 lines
                    
1# websocket-driver [![Build Status](https://travis-ci.org/faye/websocket-driver-node.svg)](https://travis-ci.org/faye/websocket-driver-node)
                    
2
                    
17* Negotiate and use extensions via the
                    
18  [websocket-extensions](https://github.com/faye/websocket-extensions-node)
                    
19  module
                    
62server.on('upgrade', function(request, socket, body) {
                    
63  if (!websocket.isWebSocket(request)) return;
                    
64
                    
136var net = require('net'),
                    
137    websocket = require('websocket-driver');
                    
138
                    
287`Sec-WebSocket-Extensions` header. `extension` is any extension compatible with
                    
288the [websocket-extensions](https://github.com/faye/websocket-extensions-node)
                    
289framework.
                    
311
                    
312Sends a text message over the socket. If the socket handshake is not yet
                    
313complete, the message will be queued until it is. Returns `true` if the message
                    
                
ns3tcp-interop-test-suite.cc https://gitlab.com/pmaddi/cs433 | C++ | 316 lines
                    
25#include "ns3/uinteger.h"
                    
26#include "ns3/inet-socket-address.h"
                    
27#include "ns3/point-to-point-helper.h"
                    
249  Address sinkAddress (InetSocketAddress(interfaces.GetAddress (0), sinkPort));
                    
250  PacketSinkHelper packetSinkHelper ("ns3::TcpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), sinkPort));
                    
251  ApplicationContainer sinkApps = packetSinkHelper.Install (nodes.Get (0));
                    
259  //
                    
260  OnOffHelper onOffHelper ("ns3::TcpSocketFactory", sinkAddress);
                    
261  onOffHelper.SetAttribute ("MaxBytes", UintegerValue (100000));
                    
                
best-practice-security.md https://gitlab.com/HDworley/expressjs.com | Markdown | 299 lines
                    
51
                    
52Você pode estar familiarizado com a criptografia Secure Sockets Layer(SSL). [O
                    
53TLS é simplesmente a próxima progressão do](https://msdn.microsoft.com/en-us/library/windows/desktop/aa380515(v=vs.85).aspx). Em outras palavras, se você estava usando o SSL antes, considere fazer o
                    
                
6.x-or-7.x-to-7.14.md https://gitlab.com/solidnerd/gitlab-ce | Markdown | 317 lines
                    
111
                    
112## 5. Configure Redis to use sockets
                    
113
                    
113
                    
114    # Configure redis to use sockets
                    
115    sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig
                    
117    sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf
                    
118    # Enable Redis socket for default Debian / Ubuntu path
                    
119    echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf
                    
120    # Be sure redis group can write to the socket, enable only if supported (>= redis 2.4.0).
                    
121    sudo sed -i '/# unixsocketperm/ s/^# unixsocketperm.*/unixsocketperm 0775/' /etc/redis/redis.conf
                    
122    # Activate the changes to redis.conf
                    
132    # Configure gitlab-shell to use Redis sockets
                    
133    sudo -u git -H sed -i 's|^  # socket.*|  socket: /var/run/redis/redis.sock|' /home/git/gitlab-shell/config.yml
                    
134
                    
                
History.md https://gitlab.com/augurpl/gitlab-ci-hipster-image | Markdown | 397 lines
                    
4
                    
5  * package: bump `socket.io` for node4 support
                    
6  * package: bump `engine.io-client` for node4 compatibility
                    
20
                    
21 * build `socket.io.js` with `engine.io-client` `1.5.1`
                    
22
                    
30
                    
31 * build `socket.io.js`
                    
32
                    
42 * package: bump `engine.io-client`
                    
43 * added `socket.id` property pointing to session id [rase-]
                    
44 * fix url parsing when uri string is undefined [defunctzombie]
                    
70
                    
71 * socket: fix in `has-binary`
                    
72 * package: bump `socket.io-parser`
                    
                
inet_connection_sock.h https://gitlab.com/neohackt/android_kernel_elephone_p8000 | C Header | 348 lines
                    
74 * @icsk_rto:		   Retransmit timeout
                    
75 * @icsk_pmtu_cookie	   Last pmtu seen by socket
                    
76 * @icsk_ca_ops		   Pluggable congestion control hook
                    
112		__u8		  pingpong;	 /* The session is interactive		   */
                    
113		__u8		  blocked;	 /* Delayed ACK was blocked by socket lock */
                    
114		__u32		  ato;		 /* Predicted tick of soft clock	   */
                    
                
config.h https://gitlab.com/devicenull/ntpsec | C Header | 528 lines
                    
86 * On Windows built with 64-bit time_t, sock_timeval.tv_sec is a long
                    
87 * as required by Windows' socket() interface timeout argument, while
                    
88 * timeval.tv_sec is time_t for the more common use as a UTC time 
                    
244
                    
245#define OPEN_BCAST_SOCKET		1	/* for ntp_io.c */
                    
246#define TYPEOF_IP_MULTICAST_LOOP	BOOL
                    
322 * to deal with our mixture of C runtime (open, write) and Windows
                    
323 * (sockets, serial ports) error codes.  This is an ugly hack because
                    
324 * both use the lowest values differently, but particularly for ntpd,
                    
330#define MCAST				/* Enable Multicast Support */
                    
331#define MULTICAST_NONEWSOCKET		/* Don't create a new socket for mcast address */
                    
332
                    
                
test_get_sendfile.c https://gitlab.com/karlson2k/libmicrohttpd-old | C | 514 lines
                    
34#include <fcntl.h>
                    
35#include "mhd_sockets.h"
                    
36
                    
37#ifndef WINDOWS
                    
38#include <sys/socket.h>
                    
39#include <unistd.h>
                    
278  fd_set es;
                    
279  MHD_socket maxsock;
                    
280#ifdef MHD_WINSOCK_SOCKETS
                    
280#ifdef MHD_WINSOCK_SOCKETS
                    
281  int maxposixs; /* Max socket number unused on W32 */
                    
282#else  /* MHD_POSIX_SOCKETS */
                    
283#define maxposixs maxsock
                    
284#endif /* MHD_POSIX_SOCKETS */
                    
285  int running;
                    
                
sfds.c https://gitlab.com/adam.lukaitis/Win32-OpenSSH | C | 459 lines
                    
145	{
                    
146		bIsSocket = FALSE;
                    
147	}
                    
148
                    
149	// if (!bIsSocket && fd_or_handle > 600)
                    
150   //	  bIsSocket = TRUE;
                    
151
                    
152	if (bIsSocket == TRUE)
                    
153		real_handle = (HANDLE)fd_or_handle;
                    
213      
                    
214      if (getsockopt((SOCKET) real_handle, SOL_SOCKET, 
                    
215                         SO_ACCEPTCONN, (char *) &optVal, &optLen))
                    
220      {
                    
221        sfd_map[slot].type = SFD_TYPE_SOCKET;
                    
222      }
                    
                
iwinfo_utils.c https://gitlab.com/gl-xinshouyong/1407-mifi-customer-tmp | C | 367 lines
                    
25
                    
26static int ioctl_socket = -1;
                    
27
                    
27
                    
28static int iwinfo_ioctl_socket(void)
                    
29{
                    
29{
                    
30	/* Prepare socket */
                    
31	if (ioctl_socket == -1)
                    
32	{
                    
33		ioctl_socket = socket(AF_INET, SOCK_DGRAM, 0);
                    
34		fcntl(ioctl_socket, F_SETFD, fcntl(ioctl_socket, F_GETFD) | FD_CLOEXEC);
                    
36
                    
37	return ioctl_socket;
                    
38}
                    
                
sockets.js https://gitlab.com/talesprates/socialnetwork | JavaScript | 141 lines
                    
9 * For more information on sockets configuration, including advanced config options, see:
                    
10 * http://sailsjs.org/#!/documentation/reference/sails.config/sails.config.sockets.html
                    
11 */
                    
32  * Luckily, Socket.io (and consequently Sails.js) apps support Redis for    *
                    
33  * sockets by default. To enable a remote redis pubsub server, uncomment    *
                    
34  * the config below.                                                        *
                    
46
                    
47  // adapter: 'socket.io-redis',
                    
48  // host: '127.0.0.1',
                    
76  * This custom beforeConnect function will be run each time BEFORE a new    *
                    
77  * socket is allowed to connect, when the initial socket.io handshake is    *
                    
78  * performed with the server.                                               *
                    
138  ***************************************************************************/
                    
139  // transports: ["polling", "websocket"]
                    
140
                    
                
libiscsi.h https://gitlab.com/webhaikal/SenseiOneplus3 | C Header | 497 lines
                    
41struct scsi_cmnd;
                    
42struct socket;
                    
43struct iscsi_transport;
                    
                
dsgetdc.h https://gitlab.com/ubuntu-trusty/mingw-w64 | C Header | 187 lines
                    
105
                    
106  DSGETDCAPI DWORD WINAPI DsAddressToSiteNamesW(LPCWSTR ComputerName,DWORD EntryCount,PSOCKET_ADDRESS SocketAddresses,LPWSTR **SiteNames);
                    
107  DSGETDCAPI DWORD WINAPI DsAddressToSiteNamesA(LPCSTR ComputerName,DWORD EntryCount,PSOCKET_ADDRESS SocketAddresses,LPSTR **SiteNames);
                    
107  DSGETDCAPI DWORD WINAPI DsAddressToSiteNamesA(LPCSTR ComputerName,DWORD EntryCount,PSOCKET_ADDRESS SocketAddresses,LPSTR **SiteNames);
                    
108  DSGETDCAPI DWORD WINAPI DsAddressToSiteNamesExW(LPCWSTR ComputerName,DWORD EntryCount,PSOCKET_ADDRESS SocketAddresses,LPWSTR **SiteNames,LPWSTR **SubnetNames);
                    
109  DSGETDCAPI DWORD WINAPI DsAddressToSiteNamesExA(LPCSTR ComputerName,DWORD EntryCount,PSOCKET_ADDRESS SocketAddresses,LPSTR **SiteNames,LPSTR **SubnetNames);
                    
178  DSGETDCAPI DWORD WINAPI DsGetDcOpenA(LPCSTR DnsName,ULONG OptionFlags,LPCSTR SiteName,GUID *DomainGuid,LPCSTR DnsForestName,ULONG DcFlags,PHANDLE RetGetDcContext);
                    
179  DSGETDCAPI DWORD WINAPI DsGetDcNextW(HANDLE GetDcContextHandle,PULONG SockAddressCount,LPSOCKET_ADDRESS *SockAddresses,LPWSTR *DnsHostName);
                    
180  DSGETDCAPI DWORD WINAPI DsGetDcNextA(HANDLE GetDcContextHandle,PULONG SockAddressCount,LPSOCKET_ADDRESS *SockAddresses,LPSTR *DnsHostName);
                    
                
v0.9.2.1.md https://gitlab.com/Aaeinstein54/bitcoin.org | Markdown | 222 lines
                    
103- Add new DNS seed from bitnodes.io
                    
104- Prevent socket leak in ThreadSocketHandler and correct some proxy related socket leaks
                    
105- Use pnode->nLastRecv as sync score (was the wrong way around)
                    
                
pathnames.h https://gitlab.com/adam.lukaitis/Win32-OpenSSH | C Header | 215 lines
                    
167
                    
168/* UNIX domain socket for X11 server; displaynum will replace %u */
                    
169#ifndef _PATH_UNIX_X
                    
                
genl_ctrl.c https://gitlab.com/gl-xinshouyong/1407-mifi-customer-tmp | C | 302 lines
                    
213 * Resolve generic netlink family name to its identifier
                    
214 * @arg sk		Netlink socket.
                    
215 * @arg name		Name of generic netlink family
                    
                
syscall_table.S https://gitlab.com/webhaikal/SenseiOneplus3 | Assembly | 447 lines
                    
75	ENTRY_SAME(lchown)
                    
76	ENTRY_SAME(socket)
                    
77	/* struct stat is MAYBE identical wide and narrow ?? */
                    
126	ENTRY_COMP(fcntl)		/* 55 */
                    
127	ENTRY_SAME(socketpair)
                    
128	ENTRY_SAME(setpgid)
                    
155	ENTRY_SAME(setgroups)
                    
156	/* struct socketaddr... */
                    
157	ENTRY_SAME(sendto)
                    
177	ENTRY_SAME(stat64)
                    
178	ENTRY_SAME(ni_syscall)	/* was socketcall */
                    
179	ENTRY_SAME(syslog)
                    
                
Query.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 182 lines
                    
48import java.io.PrintStream;
                    
49import java.net.Socket;
                    
50import java.util.Locale;
                    
134                try {
                    
135                    Socket s = new Socket("google.com",80); //NOI18N
                    
136                    PrintStream p = new PrintStream(s.getOutputStream());
                    
                
_stream_writable.js https://gitlab.com/jeaster12/gulp-nunjucks | JavaScript | 529 lines
                    
101  // of how much we're waiting to get pushed to some underlying
                    
102  // socket or file.
                    
103  this.length = 0;
                    
                
networkLogView.css https://gitlab.com/x33n/phantomjs | CSS | 540 lines
                    
364
                    
365.network-type-websocket .network-graph-bar {
                    
366    -webkit-border-image: url(Images/timelinePillGray.png) 7 7 7 7;
                    
368
                    
369.network-type-websocket.resource-cached .network-graph-bar {
                    
370   -webkit-border-image: url(Images/timelineHollowPillGray.png) 7 7 7 7;
                    
                
BluetoothServer.java https://gitlab.com/paresh/fdroidclient | Java | 361 lines
                    
33
                    
34    private BluetoothServerSocket serverSocket;
                    
35    private final List<ClientConnection> clients = new ArrayList<>();
                    
60        if (serverSocket != null) {
                    
61            Utils.closeQuietly(serverSocket);
                    
62        }
                    
87            try {
                    
88                BluetoothSocket clientSocket = serverSocket.accept();
                    
89                if (clientSocket != null) {
                    
106
                    
107        private final BluetoothSocket socket;
                    
108        private final File webRoot;
                    
110        ClientConnection(BluetoothSocket socket, File webRoot) {
                    
111            this.socket = socket;
                    
112            this.webRoot = webRoot;
                    
                
index.coffee https://gitlab.com/nuitdeboutlyon-group/nuitdeboutlyon-radio | CoffeeScript | 284 lines
                    
6IO      = require "./slave_io"
                    
7SocketSource = require "./socket_source"
                    
8
                    
242
                    
243                    socket = l.obj.socket
                    
244                    lopts =
                    
253                    # don't send in that case...
                    
254                    if socket && !socket.destroyed
                    
255                        lFunc lopts, socket, (err) =>
                    
271        # check and make sure they haven't disconnected mid-flight
                    
272        if socket && !socket.destroyed
                    
273            # create an output and attach it to the proper stream
                    
274            output = new @Outputs[ obj.client.output ] @streams[ obj.stream ],
                    
275                socket:     socket
                    
276                client:     obj.client
                    
                
wsgi_server.py https://gitlab.com/gregtyka/frankenserver | Python | 421 lines
                    
86    if not connection.rfile.closed:
                    
87      connection.socket.shutdown(socket.SHUT_RD)
                    
88
                    
214    try:
                    
215      info = socket.getaddrinfo(host, port, socket.AF_UNSPEC,
                    
216                                socket.SOCK_STREAM, 0, socket.AI_PASSIVE)
                    
243    self._start_time = time.time()
                    
244    _SELECT_THREAD.add_socket(self.socket, self.tick)
                    
245
                    
247    """Quits the _SingleAddressWsgiServer."""
                    
248    _SELECT_THREAD.remove_socket(self.socket)
                    
249    self.requests.stop(timeout=1)
                    
303      addrinfo = socket.getaddrinfo(host, port, socket.AF_UNSPEC,
                    
304                                    socket.SOCK_STREAM, 0, socket.AI_PASSIVE)
                    
305      sockaddrs = [addr[-1] for addr in addrinfo]
                    
                
command.h https://gitlab.com/rychly/rk3026-linux-sources | C Header | 224 lines
                    
56	SCTP_CMD_GEN_COOKIE_ECHO, /* Generate a COOKIE ECHO chunk. */
                    
57	SCTP_CMD_CHUNK_ULP,	/* Send a chunk to the sockets layer.  */
                    
58	SCTP_CMD_EVENT_ULP,	/* Send a notification to the sockets layer. */
                    
                
README.md https://gitlab.com/fogteen/gasaon | Markdown | 308 lines
                    
97
                    
98### Socket id
                    
99
                    
99
                    
100In order to avoid duplicates you can optionally specify the sender's socket id while triggering an event ([https://pusher.com/docs/duplicates](http://pusherapp.com/docs/duplicates)):
                    
101
                    
102```php
                    
103$pusher->trigger('my-channel','event','data','socket_id');
                    
104```
                    
115
                    
116To authorise your users to access private channels on Pusher, you can use the socket_auth function:
                    
117
                    
118```php
                    
119$pusher->socket_auth('my-channel','socket_id');
                    
120```
                    
                
dlmast.c https://gitlab.com/kush/linux | C | 502 lines
                    
35#include <linux/blkdev.h>
                    
36#include <linux/socket.h>
                    
37#include <linux/inet.h>
                    
                
Android.mk https://gitlab.com/AvayKumar/android_frameworks_base | Makefile | 271 lines
                    
78	android_os_UEventObserver.cpp \
                    
79	android_net_LocalSocketImpl.cpp \
                    
80	android_net_NetUtils.cpp \
                    
155	android_server_FingerprintManager.cpp \
                    
156	android_server_NetworkManagementSocketTagger.cpp \
                    
157	android_server_Watchdog.cpp \
                    
                
Download.php https://gitlab.com/yousafsyed/easternglamor | PHP | 287 lines
                    
135    /**
                    
136     * Retrieve Resource file handle (socket, file pointer etc)
                    
137     *
                    
                
CHANGELOG.md https://gitlab.com/jeaster12/fabby | Markdown | 219 lines
                    
51# Chokidar 0.12.3 (13 December 2014)
                    
52* Fix handling of special files such as named pipes and sockets
                    
53
                    
                
CLI.java https://gitlab.com/kalyanjk29/jenkins | Java | 382 lines
                    
35import hudson.remoting.RemoteOutputStream;
                    
36import hudson.remoting.SocketInputStream;
                    
37import hudson.remoting.SocketOutputStream;
                    
49import java.io.OutputStream;
                    
50import java.net.Socket;
                    
51import java.net.URL;
                    
96            LOGGER.fine("Trying to connect directly via TCP/IP to port "+clip+" of "+host);
                    
97            Socket s = new Socket(host,clip);
                    
98            DataOutputStream dos = new DataOutputStream(s.getOutputStream());
                    
101            channel = new Channel("CLI connection to "+jenkins, pool,
                    
102                    new BufferedInputStream(new SocketInputStream(s)),
                    
103                    new BufferedOutputStream(new SocketOutputStream(s)));
                    
                
AppDelegate.cpp https://gitlab.com/blackbit0/cocos2d-x | C++ | 185 lines
                    
28#include "network/XMLHTTPRequest.h"
                    
29#include "network/jsb_websocket.h"
                    
30#include "network/jsb_socketio.h"
                    
103    sc->addRegisterCallback(MinXmlHttpRequest::_js_register);
                    
104    sc->addRegisterCallback(register_jsb_websocket);
                    
105	sc->addRegisterCallback(register_jsb_socketio);
                    
                
using_docker_images.md https://gitlab.com/dixpac/gitlab-ci | Markdown | 203 lines
                    
40The service container for MySQL will be accessible under hostname `mysql`.
                    
41So, **to access your database service you have to connect to host: `mysql` instead of socket or `localhost`**.
                    
42
                    
                
SensorService.h https://gitlab.com/cde/debian_android-tools_android-platform-frameworks-native | C Header | 253 lines
                    
51// Max size is 100 KB which is enough to accept a batch of about 1000 events.
                    
52#define MAX_SOCKET_BUFFER_SIZE_BATCHED 100 * 1024
                    
53// For older HALs which don't support batching, use a smaller socket buffer size.
                    
53// For older HALs which don't support batching, use a smaller socket buffer size.
                    
54#define SOCKET_BUFFER_SIZE_NON_BATCHED 4 * 1024
                    
55
                    
224
                    
225    // Socket buffersize used to initialize BitTube. This size depends on whether batching is
                    
226    // supported or not.
                    
226    // supported or not.
                    
227    uint32_t mSocketBufferSize;
                    
228    sp<Looper> mLooper;
                    
                
cl-async-irc.lisp https://gitlab.com/lispbot/cl-async-irc | Lisp | 411 lines
                    
7(defclass connection ()
                    
8  ((socket :initarg :socket :reader connection-socket)
                    
9   (line-buffer :initform nil :accessor connection-line-buffer)
                    
24     (bb:alet ((socket (connect-internal host port connection tls)))
                    
25       (setf (slot-value connection 'socket) socket)
                    
26       (when nick (nick connection nick))
                    
48(defun disconnect (connection)
                    
49  (as:close-socket (connection-socket connection))
                    
50  (cancle-ping-timeout connection))
                    
185(defun command (connection command &rest args)
                    
186  (as:write-socket-data (connection-socket connection)
                    
187                        (format nil "~a~{ ~a~}~@[ :~a~]~a~a" command (butlast args) (car (last args))
                    
                
rose_link.c https://gitlab.com/deadnem/Singularity | C | 291 lines
                    
10#include <linux/types.h>
                    
11#include <linux/socket.h>
                    
12#include <linux/in.h>
                    
235 * This routine is called when a Clear Request is needed outside of the context
                    
236 * of a connected socket.
                    
237 */
                    
                
overload1.html git://github.com/MisterTea/HyperNEAT.git | HTML | 94 lines
                    
26<div class="titlepage"><div><div><h5 class="title">
                    
27<a name="boost_asio.reference.basic_socket_streambuf.shutdown.overload1"></a><a class="link" href="overload1.html" title="basic_socket_streambuf::shutdown (1 of 2 overloads)">basic_socket_streambuf::shutdown
                    
28          (1 of 2 overloads)</a>
                    
44<a name="boost_asio.reference.basic_socket_streambuf.shutdown.overload1.h0"></a>
                    
45            <span class="phrase"><a name="boost_asio.reference.basic_socket_streambuf.shutdown.overload1.parameters"></a></span><a class="link" href="overload1.html#boost_asio.reference.basic_socket_streambuf.shutdown.overload1.parameters">Parameters</a>
                    
46          </h6>
                    
57<a name="boost_asio.reference.basic_socket_streambuf.shutdown.overload1.h1"></a>
                    
58            <span class="phrase"><a name="boost_asio.reference.basic_socket_streambuf.shutdown.overload1.exceptions"></a></span><a class="link" href="overload1.html#boost_asio.reference.basic_socket_streambuf.shutdown.overload1.exceptions">Exceptions</a>
                    
59          </h6>
                    
75          </p>
                    
76<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">ip</span><span class="special">::</span><span class="identifier">tcp</span><span class="special">::</span><span class="identifier">socket</span> <span class="identifier">socket</span><span class="special">(</span><span class="identifier">io_service</span><span class="special">);</span>
                    
77<span class="special">...</span>
                    
77<span class="special">...</span>
                    
78<span class="identifier">socket</span><span class="special">.</span><span class="identifier">shutdown</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">ip</span><span class="special">::</span><span class="identifier">tcp</span><span class="special">::</span><span class="identifier">socket</span><span class="special">::</span><span class="identifier">shutdown_send</span><span class="special">);</span>
                    
79</pre>
                    
                
send.html git://github.com/MisterTea/HyperNEAT.git | HTML | 68 lines
                    
7<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
                    
8<link rel="up" href="../basic_raw_socket.html" title="basic_raw_socket">
                    
9<link rel="prev" href="reuse_address.html" title="basic_raw_socket::reuse_address">
                    
22<div class="spirit-nav">
                    
23<a accesskey="p" href="reuse_address.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../basic_raw_socket.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="send/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
                    
24</div>
                    
26<div class="titlepage"><div><div><h4 class="title">
                    
27<a name="boost_asio.reference.basic_raw_socket.send"></a><a class="link" href="send.html" title="basic_raw_socket::send">basic_raw_socket::send</a>
                    
28</h4></div></div></div>
                    
36    <span class="keyword">const</span> <span class="identifier">ConstBufferSequence</span> <span class="special">&amp;</span> <span class="identifier">buffers</span><span class="special">);</span>
                    
37  <span class="emphasis"><em>&#187; <a class="link" href="send/overload1.html" title="basic_raw_socket::send (1 of 3 overloads)">more...</a></em></span>
                    
38
                    
40    <span class="keyword">typename</span> <a class="link" href="../ConstBufferSequence.html" title="Constant buffer sequence requirements">ConstBufferSequence</a><span class="special">&gt;</span>
                    
41<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="send/overload2.html" title="basic_raw_socket::send (2 of 3 overloads)">send</a><span class="special">(</span>
                    
42    <span class="keyword">const</span> <span class="identifier">ConstBufferSequence</span> <span class="special">&amp;</span> <span class="identifier">buffers</span><span class="special">,</span>
                    
                
network.c https://gitlab.com/matt81093/Darwinia-and-Multiwinia-Source-Code | C | 278 lines
                    
9#include <sys/wait.h>
                    
10#include <sys/socket.h>
                    
11#include <netinet/in.h>
                    
106
                    
107    /* Now try to create a socket and connect */
                    
108#ifdef TEST_MAIN
                    
110#endif
                    
111    sock = socket(AF_INET, SOCK_STREAM, 0);
                    
112    if ( sock < 0 ) {
                    
113#ifdef TEST_MAIN
                    
114        printf("socket() failed! %s\n", strerror(errno));
                    
115#endif
                    
137/* This does a non-blocking network check of a URL
                    
138   It returns a socket file descriptor which is passed to wait_network(),
                    
139   or -1 if an error occurred while setting up the network check.
                    
                
NetServer.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 471 lines
                    
33import java.net.ConnectException;
                    
34import java.net.Socket;
                    
35import org.apache.derbyTesting.functionTests.util.TestUtil;
                    
224 			{
                    
225 				Socket s = new Socket(hostName, this.port);
                    
226 				s.close();
                    
                
dsi_tcp.c git://pkgs.fedoraproject.org/netatalk | C | 414 lines
                    
26#include <sys/time.h>
                    
27#include <sys/socket.h>
                    
28
                    
79{
                    
80    if (dsi->socket == -1)
                    
81        return;
                    
82
                    
83    close(dsi->socket);
                    
84    dsi->socket = -1;
                    
94static struct itimerval itimer;
                    
95/* accept the socket and do a little sanity checking */
                    
96static int dsi_tcp_open(DSI *dsi)
                    
101    len = sizeof(dsi->client);
                    
102    dsi->socket = accept(dsi->serversock, (struct sockaddr *) &dsi->client, &len);
                    
103
                    
                
cu_srv.c https://gitlab.com/rainbowguardians/RainbowHard | C | 613 lines
                    
37
                    
38static SOCKTYPE elisten_sock =         INVALID_SOCKET; /* Crypto Engine server socket -
                    
39                                                   listening socket descriptor */
                    
39                                                   listening socket descriptor */
                    
40static SOCKTYPE esvr_sock    =         INVALID_SOCKET; /* Crypto Engine server active socket - 
                    
41                                                   connected socket descriptor */
                    
283   {
                    
284      if (esvr_sock != INVALID_SOCKET)
                    
285      {
                    
421{
                    
422   if (elisten_sock == INVALID_SOCKET)
                    
423      return;  /* Crypto Engine Server not set up, don't bother */
                    
458      /* open TCP socket */
                    
459      elisten_sock = socket(AF_INET, SOCK_STREAM, 0);
                    
460      if (elisten_sock == INVALID_SOCKET)
                    
                
ip.h https://gitlab.com/VD-EDU/vd-iot-evalkit-sdk | C Header | 260 lines
                    
85  ipX_addr_t remote_ip; \
                    
86   /* Socket options */  \
                    
87  u8_t so_options;      \
                    
100/*
                    
101 * Option flags per-socket. These are the same like SO_XXX.
                    
102 */
                    
103/*#define SOF_DEBUG       0x01U     Unimplemented: turn on debugging info recording */
                    
104#define SOF_ACCEPTCONN    0x02U  /* socket has had listen() */
                    
105#define SOF_REUSEADDR     0x04U  /* allow local address reuse */
                    
                
basecommand.py https://gitlab.com/BeshoyAtef/StudentsPortal | Python | 201 lines
                    
3import os
                    
4import socket
                    
5import sys
                    
119
                    
120        socket.setdefaulttimeout(options.timeout or None)
                    
121
                    
                
OkHttpClient.java https://gitlab.com/bsan/ionicDev | Java | 408 lines
                    
51  private ResponseCache responseCache;
                    
52  private SSLSocketFactory sslSocketFactory;
                    
53  private HostnameVerifier hostnameVerifier;
                    
194   *
                    
195   * <p>If unset, the {@link HttpsURLConnection#getDefaultSSLSocketFactory()
                    
196   * system-wide default} SSL socket factory will be used.
                    
197   */
                    
198  public OkHttpClient setSslSocketFactory(SSLSocketFactory sslSocketFactory) {
                    
199    this.sslSocketFactory = sslSocketFactory;
                    
202
                    
203  public SSLSocketFactory getSslSocketFactory() {
                    
204    return sslSocketFactory;
                    
361    result.responseCache = responseCache != null ? responseCache : ResponseCache.getDefault();
                    
362    result.sslSocketFactory = sslSocketFactory != null
                    
363        ? sslSocketFactory
                    
                
xt_qtaguid_internal.h https://gitlab.com/webhaikal/SenseiOneplus3 | C Header | 352 lines
                    
85 * User space can set the acct_tag portion of the tag which is then used
                    
86 * with sockets: all data belonging to that socket will be counted against the
                    
87 * tag. The policing is then based on the tag's uid_tag portion,
                    
94 * d:  {acct_tag=0, uid_tag=10003}
                    
95 * a, b, and c represent tags associated with specific sockets.
                    
96 * d is for the totals for that uid, including all untagged traffic.
                    
144/*
                    
145 * Maximum number of socket tags that a UID is allowed to have active.
                    
146 * Multiple processes belonging to the same UID contribute towards this limit.
                    
250/*
                    
251 * Track tag that this socket is transferring data for, and not necessarily
                    
252 * the uid that owns the socket.
                    
259	/* The socket is needed for sockfd_put() */
                    
260	struct socket *socket;
                    
261	/* Used to associate with a given pid */
                    
                
wifi-msdu-aggregator-test-suite.cc https://gitlab.com/pmaddi/cs433 | C++ | 211 lines
                    
29#include "ns3/data-rate.h"
                    
30#include "ns3/inet-socket-address.h"
                    
31#include "ns3/packet-sink.h"
                    
135  // too in order to measure throughput in a fixed window.
                    
136  PacketSinkHelper packetSink ("ns3::UdpSocketFactory",
                    
137                               InetSocketAddress(Ipv4Address::GetAny(),
                    
148  // We configure this traffic stream to operate between 1 and 9 seconds.
                    
149  OnOffHelper onoff ("ns3::UdpSocketFactory",
                    
150                     InetSocketAddress (staNodeInterface.GetAddress (0),
                    
                
SocketsProvider.cs https://cstactics.svn.codeplex.com/svn | C# | 359 lines
                    
21
                    
22        private Socket socket;
                    
23        private DnsEndPoint endPoint;
                    
68            if (args.SocketError != SocketError.Success)
                    
69                throw new SocketException((int)args.SocketError);
                    
70        }
                    
326        {
                    
327            Socket s = e.UserToken as Socket;
                    
328            if (s.Connected)
                    
343
                    
344            //throw new SocketException((int)e.SocketError);
                    
345        }
                    
351            Initialized = false;
                    
352            socket.Shutdown(SocketShutdown.Both);
                    
353            if (socket.Connected)
                    
                
 

Source

Language