PageRenderTime 312ms queryTime 53ms sortTime 66ms getByIdsTime 85ms findMatchingLines 20ms

100+ results results for 'socket' (312 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;
                    
                
auth.go https://gitlab.com/masterlike/masterlike-bot | 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
                    
                
remote_fetcher.rb https://gitlab.com/pooja043/Globus_Docker_3 | Ruby | 507 lines
                    
62
                    
63    Socket.do_not_reverse_lookup = true
                    
64
                    
244    raise FetchError.new('timed out', uri.to_s)
                    
245  rescue IOError, SocketError, SystemCallError => e
                    
246    raise FetchError.new("#{e.class}: #{e}", uri.to_s)
                    
                
netop.c https://gitlab.com/envieidoc/advancedtomato2 | C | 528 lines
                    
21#include <sys/types.h>
                    
22#include <sys/socket.h>
                    
23#include <arpa/inet.h>
                    
62    do {
                    
63        lsock = socket( AF_INET, SOCK_STREAM, 0 );
                    
64        if( -1 == lsock ) break;
                    
82
                    
83        rc = setsockopt( lsock, SOL_SOCKET, SO_REUSEADDR,
                    
84                         &ON, sizeof(ON) );
                    
95        TRACE( (void)tmfprintf (g_flog, "Setting low watermark for "
                    
96            "server socket [%d] to [%d]\n", lsock, wmark) );
                    
97        rc = setsockopt (lsock, SOL_SOCKET, SO_RCVLOWAT,
                    
115        if(errno)
                    
116            mperror(g_flog, errno, "%s: socket/bind/listen error",
                    
117                    __func__);
                    
                
pptp_callmgr.c https://gitlab.com/envieidoc/tomato | C | 388 lines
                    
10#include <sys/stat.h>
                    
11#include <sys/socket.h>
                    
12#include <netinet/in.h>
                    
121        fatal("Invalid IP address: %s", argv[1]);
                    
122    /* Step 1: Open sockets. */
                    
123    if ((inet_sock = open_inetsock(inetaddr)) < 0)
                    
125    if ((unix_sock = open_unixsock(inetaddr)) < 0)
                    
126        fatal("Could not open unix socket for %s", argv[1]);
                    
127    /* Step 1b: FORK and return status to calling process. */
                    
137    file2fd("/dev/null", "wb", STDERR_FILENO);
                    
138    /* Step 1c: Clean up unix socket on TERM */
                    
139    if (sigsetjmp(callmgr_env, 1) != 0)
                    
187	    break;
                    
188        /* Step 5b: Handle new connection to UNIX socket */
                    
189        if (FD_ISSET(unix_sock, &read_set)) {
                    
                
gitaly_client_spec.rb https://gitlab.com/wolfgang42/gitlab-ce | Ruby | 419 lines
                    
127
                    
128    context 'when passed a UNIX socket address' do
                    
129      it 'passes the address as-is to GRPC' do
                    
                
int_homun.c https://gitlab.com/gumiko/hercules | C | 367 lines
                    
31#include "common/showmsg.h"
                    
32#include "common/socket.h"
                    
33#include "common/sql.h"
                    
                
README.md https://gitlab.com/nguyenthehiep3232/marius | Markdown | 495 lines
                    
3[![Version npm](https://img.shields.io/npm/v/ws.svg?logo=npm)](https://www.npmjs.com/package/ws)
                    
4[![CI](https://img.shields.io/github/workflow/status/websockets/ws/CI/master?label=CI&logo=github)](https://github.com/websockets/ws/actions?query=workflow%3ACI+branch%3Amaster)
                    
5[![Coverage Status](https://img.shields.io/coveralls/websockets/ws/master.svg?logo=coveralls)](https://coveralls.io/github/websockets/ws)
                    
15communication. Browser clients must use the native
                    
16[`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket)
                    
17object. To make the same code work seamlessly on Node.js and the browser, you
                    
288
                    
289A client WebSocket broadcasting to all connected WebSocket clients, including
                    
290itself.
                    
461
                    
462const client = new WebSocket('wss://echo.websocket.org/');
                    
463
                    
494[ws-server-options]:
                    
495  https://github.com/websockets/ws/blob/master/doc/ws.md#new-websocketserveroptions-callback
                    
496
                    
                
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
                    
                
test_in_http.rb https://gitlab.com/vectorci/fluentd | Ruby | 442 lines
                    
8    def startup
                    
9      socket_manager_path = ServerEngine::SocketManager::Server.generate_path
                    
10      @server = ServerEngine::SocketManager::Server.open(socket_manager_path)
                    
10      @server = ServerEngine::SocketManager::Server.open(socket_manager_path)
                    
11      ENV['SERVERENGINE_SOCKETMANAGER_PATH'] = socket_manager_path.to_s
                    
12    end
                    
                
HttpConnectionPoolBuilder.java https://gitlab.com/vincent.hsu/cyberduck | Java | 253 lines
                    
42import org.apache.http.config.SocketConfig;
                    
43import org.apache.http.conn.socket.ConnectionSocketFactory;
                    
44import org.apache.http.conn.socket.PlainConnectionSocketFactory;
                    
126                                        final ProxyFinder proxy,
                    
127                                        final SocketFactory socketFactory) {
                    
128        this(host, new PlainConnectionSocketFactory() {
                    
129            @Override
                    
130            public Socket createSocket(final HttpContext context) throws IOException {
                    
131                return socketFactory.createSocket();
                    
157    public HttpConnectionPoolBuilder(final Host host,
                    
158                                     final ConnectionSocketFactory socketFactory,
                    
159                                     final ConnectionSocketFactory sslSocketFactory,
                    
186        final int timeout = preferences.getInteger("connection.timeout.seconds") * 1000;
                    
187        builder.setDefaultSocketConfig(SocketConfig.custom()
                    
188                .setTcpNoDelay(true)
                    
                
https.d.ts https://gitlab.com/girmayegebremedhin/student_managment | TypeScript Typings | 156 lines
                    
49        addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
                    
50        addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
                    
51        addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
                    
96        once(event: string, listener: (...args: any[]) => void): this;
                    
97        once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
                    
98        once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
                    
118        prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
                    
119        prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
                    
120        prependListener(event: 'close', listener: () => void): this;
                    
130        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
                    
131        prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
                    
132        prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
                    
135        prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
                    
136        prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
                    
137        prependOnceListener(event: 'close', listener: () => void): this;
                    
                
TrustSpecifiedOkHttpClient.java https://gitlab.com/samuel-davis/DDF-TestSource | Java | 301 lines
                    
49    X509TrustManager trustManager;
                    
50    SSLSocketFactory sslSocketFactory;
                    
51
                    
60      );
                    
61      sslSocketFactory = sslContext.getSocketFactory();
                    
62    } catch (GeneralSecurityException e) {
                    
68    builder.readTimeout(readTimeout, TimeUnit.SECONDS);
                    
69    builder.sslSocketFactory(sslSocketFactory, trustManager);
                    
70
                    
82    X509TrustManager trustManager;
                    
83    SSLSocketFactory sslSocketFactory;
                    
84    ArrayList<String> certArray = getCertDirectoryFileNames();
                    
94      );
                    
95      sslSocketFactory = sslContext.getSocketFactory();
                    
96    } catch (GeneralSecurityException e) {
                    
                
index.js https://gitlab.com/bethalice523/WebAPI | JavaScript | 328 lines
                    
211
                    
212  describe('unix domain sockets', function(){
                    
213    it('without auth', function(done){
                    
                
arvcameratest.c https://gitlab.com/subin.plakkannickal/aravis | C | 420 lines
                    
17static int arv_option_gain = -1;
                    
18static gboolean arv_option_auto_socket_buffer = FALSE;
                    
19static gboolean arv_option_no_packet_resend = FALSE;
                    
26static gboolean arv_option_high_priority = FALSE;
                    
27static gboolean arv_option_no_packet_socket = FALSE;
                    
28static char *arv_option_chunks = NULL;
                    
78		"auto",					'a', 0, G_OPTION_ARG_NONE,
                    
79		&arv_option_auto_socket_buffer,		"Auto socket buffer size", NULL
                    
80	},
                    
118		"no-packet-socket",			'\0', 0, G_OPTION_ARG_NONE,
                    
119		&arv_option_no_packet_socket,		"Disable use of packet socket", NULL
                    
120	},
                    
341					g_object_set (stream,
                    
342						      "socket-buffer", ARV_GV_STREAM_SOCKET_BUFFER_AUTO,
                    
343						      "socket-buffer-size", 0,
                    
                
upnp.go https://gitlab.com/shinvdu/syncthing | Go | 440 lines
                    
129
                    
130	socket, err := net.ListenMulticastUDP("udp4", intf, &net.UDPAddr{IP: ssdp.IP})
                    
131	if err != nil {
                    
134	}
                    
135	defer socket.Close() // Make sure our socket gets closed
                    
136
                    
136
                    
137	err = socket.SetDeadline(time.Now().Add(timeout))
                    
138	if err != nil {
                    
144
                    
145	_, err = socket.WriteTo(search, ssdp)
                    
146	if err != nil {
                    
155		resp := make([]byte, 65536)
                    
156		n, _, err := socket.ReadFrom(resp)
                    
157		if err != nil {
                    
                
process.c https://gitlab.com/grayhamster/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
                    
                
jboss-as-mod-cluster_1_2.xsd https://gitlab.com/mucadoo/geo-marvel | XML Schema | 277 lines
                    
48
                    
49        <!-- Get the actual advertiseGroupAddress / advertisePort from advertiseSocket -->
                    
50        <xs:attribute name="advertise-socket" type="xs:string" use="optional"/>
                    
75        </xs:attribute>
                    
76        <xs:attribute name="socket-timeout" type="xs:int" use="optional" default="20">
                    
77            <xs:annotation>
                    
185                <xs:documentation>
                    
186                    sslProtocol: Overrides the default SSL socket protocol.
                    
187                </xs:documentation>
                    
                
workhorse_spec.rb https://gitlab.com/twang2218/gitlab | 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
                    
                
WeiXinSvcImpl.java https://gitlab.com/spiderworts/ab_pc_cms | Java | 358 lines
                    
27import org.apache.http.conn.scheme.SchemeRegistry;
                    
28import org.apache.http.conn.ssl.SSLSocketFactory;
                    
29import org.apache.http.entity.StringEntity;
                    
312	            ctx.init(null, new TrustManager[] { tm }, null);
                    
313	            SSLSocketFactory ssf = new SSLSocketFactory(ctx);
                    
314	            ssf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
                    
                
mpisocketserver.h https://gitlab.com/benbelga/muscleHPC | C Header | 405 lines
                    
265
                    
266class SocketManager: public SocketServer{
                    
267
                    
305//********************************** TCPSocketManager *******************************************
                    
306class TCPSocketManager: public SocketManager{
                    
307
                    
327
                    
328class SocketKernel: public SocketServer{
                    
329
                    
377
                    
378class MpiSocketKernel: public SocketKernel{
                    
379
                    
391
                    
392class TCPSocketKernel: public SocketKernel{
                    
393
                    
                
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});
                    
                
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}
                    
                
core-connection.h https://gitlab.com/brian0218/rk3066_r-box_android4.2.2_sdk | C Header | 169 lines
                    
31
                    
32// Socket timeout in millisec (set to 5 seconds)
                    
33#define CORE_PORT_TIMEOUT_MS    5000
                    
38 * Return:
                    
39 *  Sync socket descriptor on success, or -1 on failure, with errno appropriately
                    
40 *  set.
                    
41 */
                    
42SyncSocket* core_connection_open_socket(SockAddress* sockaddr);
                    
43
                    
45 * Param:
                    
46 *  console_socket Socket address for the console.
                    
47 * Return:
                    
125/* Creates a console client, and switches it to a given stream.
                    
126 *  console_socket Socket address for the console.
                    
127 *  stream_name Name of the stream to switch to.
                    
                
swarmnode.yaml https://gitlab.com/unofficial-mirrors/openstack-magnum | YAML | 459 lines
                    
296
                    
297  write_docker_socket:
                    
298    type: "OS::Heat::SoftwareConfig"
                    
300      group: ungrouped
                    
301      config: {get_file: ../../common/templates/swarm/fragments/write-docker-socket.yaml}
                    
302
                    
340          params:
                    
341            "$NODE_SERVICES": "docker.socket docker swarm-agent"
                    
342
                    
381        - config: {get_resource: add_docker_daemon_options}
                    
382        - config: {get_resource: write_docker_socket}
                    
383        - config: {get_resource: add_proxy}
                    
                
README.md https://gitlab.com/rickyvaughn2/Pi-GPIO-Server | Markdown | 243 lines
                    
1# angular-socket-io [![Build Status](https://travis-ci.org/btford/angular-socket-io.png)](https://travis-ci.org/btford/angular-socket-io)
                    
2
                    
91. `bower install angular-socket-io` or [download the zip](https://github.com/btford/angular-socket-io/archive/master.zip).
                    
102. Make sure the Socket.IO client lib is loaded. It's often served at `/socket.io/socket.io.js`.
                    
113. Include the `socket.js` script provided by this component into your app.
                    
80
                    
81`socket.forward` allows you to forward the events received by Socket.IO's socket to AngularJS's event system.
                    
82You can then listen to the event with `$scope.$on`.
                    
129
                    
130This option allows you to provide the `socket` service with a `Socket.IO socket` object to be used internally.
                    
131This is useful if you want to connect on a different path, or need to hold a reference to the `Socket.IO socket` object for use elsewhere.
                    
140  mySocket = socketFactory({
                    
141    ioSocket: myIoSocket
                    
142  });
                    
223]).
                    
224factory('socket', function (socketFactory) {
                    
225  return socketFactory({
                    
                
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"});
                    
                
svr-x11fwd.c https://gitlab.com/envieidoc/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;
                    
                
errno.h https://gitlab.com/envieidoc/tomato | C Header | 139 lines
                    
99#define	EUSERS		87	/* Too many users */
                    
100#define	ENOTSOCK	88	/* Socket operation on non-socket */
                    
101#define	EDESTADDRREQ	89	/* Destination address required */
                    
102#define	EMSGSIZE	90	/* Message too long */
                    
103#define	EPROTOTYPE	91	/* Protocol wrong type for socket */
                    
104#define	ENOPROTOOPT	92	/* Protocol not available */
                    
105#define	EPROTONOSUPPORT	93	/* Protocol not supported */
                    
106#define	ESOCKTNOSUPPORT	94	/* Socket type not supported */
                    
107#define	EOPNOTSUPP	95	/* Operation not supported on transport endpoint */
                    
                
configure.in https://gitlab.com/envieidoc/tomato | Autoconf | 239 lines
                    
55	CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
                    
56	LDFLAGS="-lxnet -ldevinfo -lnsl -lsocket -lrt"
                    
57fi
                    
94AC_TRY_COMPILE([#include <sys/types.h>
                    
95#include <sys/socket.h>],
                    
96	[socklen_t x;  x = 1; return x;],
                    
115AC_TYPE_SIGNAL
                    
116AC_CHECK_FUNCS(mktime select socket)
                    
117AC_CHECK_FUNCS(clock_gettime)
                    
210 #include <sys/types.h>
                    
211 #include <sys/socket.h>
                    
212 ], [ 
                    
                
util.h https://gitlab.com/cr3pt/nkernel | C Header | 268 lines
                    
69#include <sys/poll.h>
                    
70#include <sys/socket.h>
                    
71#include <sys/ioctl.h>
                    
                
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;
                    
                
ConstituentParserServer.java https://gitlab.com/neuralconcept/NLPthirdParty | Java | 195 lines
                    
27import java.io.UnsupportedEncodingException;
                    
28import java.net.ServerSocket;
                    
29import java.net.Socket;
                    
74    String kafToString;
                    
75    ServerSocket socketServer = null;
                    
76    Socket activeSocket;
                    
82      System.out.println("-> Trying to listen port... " + port);
                    
83      socketServer = new ServerSocket(port);
                    
84      System.out.println("-> Connected and listening to port " + port);
                    
86        try {
                    
87          activeSocket = socketServer.accept();
                    
88          inFromClient = new BufferedReader(new InputStreamReader(activeSocket.getInputStream(), "UTF-8"));
                    
88          inFromClient = new BufferedReader(new InputStreamReader(activeSocket.getInputStream(), "UTF-8"));
                    
89          outToClient = new BufferedWriter(new OutputStreamWriter(activeSocket.getOutputStream(), "UTF-8"));
                    
90          //get data from client
                    
                
client.js https://gitlab.com/varunkothamachu/hack.chat | JavaScript | 282 lines
                    
51function join(channel) {
                    
52	ws = new WebSocket('ws://' + document.domain + ':6060')
                    
53	// ws = new WebSocket('wss://' + document.domain + '/chat-ws')
                    
                
MemoryFileSystem.js https://gitlab.com/ricky1477/twitter-clone | JavaScript | 225 lines
                    
57			isFIFO: falseFn,
                    
58			isSocket: falseFn
                    
59		};
                    
67			isFIFO: falseFn,
                    
68			isSocket: falseFn
                    
69		};
                    
                
tcp_probe.c https://gitlab.com/pine64-android/linux-3.10 | C | 260 lines
                    
24#include <linux/kprobes.h>
                    
25#include <linux/socket.h>
                    
26#include <linux/tcp.h>
                    
                
CompositeX509KeyManager.scala https://gitlab.com/KiaraGrouwstra/playframework | Scala | 165 lines
                    
10import java.security.cert.{ CertificateException, X509Certificate }
                    
11import java.net.Socket
                    
12import scala.collection.mutable.ArrayBuffer
                    
47
                    
48  def chooseClientAlias(keyType: Array[String], issuers: Array[Principal], socket: Socket): String = {
                    
49    logger.debug(s"chooseClientAlias: keyType = ${keyType.toSeq}, issuers = ${issuers.toSeq}, socket = $socket")
                    
51    withKeyManagers { keyManager =>
                    
52      val clientAlias = keyManager.chooseClientAlias(keyType, issuers, socket)
                    
53      if (clientAlias != null) {
                    
110
                    
111  def chooseServerAlias(keyType: String, issuers: Array[Principal], socket: Socket): String = {
                    
112    logger.debug(s"chooseServerAlias: keyType = $keyType, issuers = ${issuers.toSeq}, socket = $socket")
                    
113    withKeyManagers { keyManager =>
                    
114      val serverAlias = keyManager.chooseServerAlias(keyType, issuers, socket)
                    
115      if (serverAlias != null) {
                    
                
test.sh https://gitlab.com/kush/jarulraj-postgresql-cpp | Shell | 229 lines
                    
40		LISTEN_ADDRESSES=""
                    
41		# Select a socket directory.  The algorithm is from the "configure"
                    
42		# script; the outcome mimics pg_regress.c:make_temp_sockdir().
                    
54			{
                    
55				echo "could not create socket temporary directory in \"/tmp\""
                    
56				exit 1
                    
                
WebSocketClientHandshakerFactory.java https://gitlab.com/taichu/netty | Java | 132 lines
                    
21
                    
22import static io.netty.handler.codec.http.websocketx.WebSocketVersion.*;
                    
23
                    
50    public static WebSocketClientHandshaker newHandshaker(
                    
51            URI webSocketURL, WebSocketVersion version, String subprotocol,
                    
52            boolean allowExtensions, HttpHeaders customHeaders) {
                    
74    public static WebSocketClientHandshaker newHandshaker(
                    
75            URI webSocketURL, WebSocketVersion version, String subprotocol,
                    
76            boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength) {
                    
83     *
                    
84     * @param webSocketURL
                    
85     *            URL for web socket communications. e.g "ws://myhost.com/mypath".
                    
106    public static WebSocketClientHandshaker newHandshaker(
                    
107            URI webSocketURL, WebSocketVersion version, String subprotocol,
                    
108            boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength,
                    
                
server.js https://gitlab.com/thomasphillips3/beerlocker | 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    }
                    
                
EcoreController.xtend https://gitlab.com/yeckey/fundus-pyro-demo | Xtend | 159 lines
                    
24	import info.scce.pyro.core.rest.types.CreateEcore;
                    
25	import info.scce.pyro.sync.GraphModelWebSocket;
                    
26	import info.scce.pyro.sync.ProjectWebSocket;
                    
54		@javax.inject.Inject
                    
55		private ProjectWebSocket projectWebSocket;
                    
56	
                    
57		@javax.inject.Inject
                    
58		private GraphModelWebSocket graphModelWebSocket;
                    
59	
                    
120	        PyroProject pp = graphModelController.getProject(folder);
                    
121	        projectWebSocket.send(pp.getDywaId(), WebSocketMessage.fromDywaEntity(subject.getDywaId(), info.scce.pyro.core.rest.types.PyroProjectStructure.fromDywaEntity(pp,objectCache)));
                    
122	        
                    
146				PyroProject pp = graphModelController.getProject(parent);
                    
147				projectWebSocket.send(pp.getDywaId(), WebSocketMessage.fromDywaEntity(subject.getDywaId(), info.scce.pyro.core.rest.types.PyroProjectStructure.fromDywaEntity(pp,objectCache)));
                    
148				
                    
                
os-win32.h https://gitlab.com/paelzer/qemu | C Header | 213 lines
                    
131
                    
132/* We wrap all the sockets functions so that we can
                    
133 * set errno based on WSAGetLastError()
                    
150#undef socket
                    
151#define socket qemu_socket_wrap
                    
152int qemu_socket_wrap(int domain, int type, int protocol);
                    
163#undef ioctlsocket
                    
164#define ioctlsocket qemu_ioctlsocket_wrap
                    
165int qemu_ioctlsocket_wrap(int fd, int req, void *val);
                    
167#undef closesocket
                    
168#define closesocket qemu_closesocket_wrap
                    
169int qemu_closesocket_wrap(int fd);
                    
                
config.h https://gitlab.com/brian0218/rk3066_r-box_android4.2.2_sdk | C Header | 393 lines
                    
108	 *
                    
109	 * For UNIX domain sockets (default on Linux and BSD): This is a
                    
110	 * directory that will be created for UNIX domain sockets for listening
                    
111	 * to requests from external programs (CLI/GUI, etc.) for status
                    
112	 * information and configuration. The socket file will be named based
                    
113	 * on the interface name, so multiple %wpa_supplicant processes can be
                    
114	 * run at the same time if more than one interface is used.
                    
115	 * /var/run/wpa_supplicant is the recommended directory for sockets and
                    
116	 * by default, wpa_cli will use it when trying to connect with
                    
120	 * by setting the directory to allow only members of a group
                    
121	 * to use sockets. This way, it is possible to run
                    
122	 * %wpa_supplicant as root (since it needs to change network
                    
122	 * %wpa_supplicant as root (since it needs to change network
                    
123	 * configuration and open raw sockets) and still allow GUI/CLI
                    
124	 * components to be run as non-root users. However, since the
                    
                
rdma_user_cm.h https://gitlab.com/oyvholm/linux | C Header | 311 lines
                    
37#include <linux/types.h>
                    
38#include <linux/socket.h>
                    
39#include <linux/in6.h>
                    
                
regress_listener.c https://gitlab.com/storedmirrors/minix | C | 215 lines
                    
35#ifndef WIN32
                    
36#include <sys/socket.h>
                    
37#include <netinet/in.h>
                    
55static void
                    
56acceptcb(struct evconnlistener *listener, evutil_socket_t fd,
                    
57    struct sockaddr *addr, int socklen, void *arg)
                    
61	TT_BLATHER(("Got one for %p", ptr));
                    
62	evutil_closesocket(fd);
                    
63
                    
81
                    
82	evutil_socket_t fd1 = -1, fd2 = -1, fd3 = -1;
                    
83
                    
118	fd1 = fd2 = fd3 = -1;
                    
119	evutil_socket_connect(&fd1, (struct sockaddr*)&ss1, slen1);
                    
120	evutil_socket_connect(&fd2, (struct sockaddr*)&ss1, slen1);
                    
                
README.md https://gitlab.com/dongrvtop/angularcomponent | Markdown | 300 lines
                    
3
                    
4[![Build Status](https://github.com/socketio/engine.io-client/workflows/CI/badge.svg)](https://github.com/socketio/engine.io-client/actions)
                    
5[![NPM version](https://badge.fury.io/js/engine.io-client.svg)](http://badge.fury.io/js/engine.io-client)
                    
8the implementation of transport-based cross-browser/cross-device
                    
9bi-directional communication layer for [Socket.IO](http://github.com/socketio/socket.io).
                    
10
                    
67<script>
                    
68  var socket = new eio.Socket('ws://localhost/');
                    
69  socket.binaryType = 'blob';
                    
228      - `onlyBinaryUpgrades` (`Boolean`): whether transport upgrades should be restricted to transports supporting binary data (`false`)
                    
229      - `forceNode` (`Boolean`): Uses NodeJS implementation for websockets - even if there is a native Browser-Websocket available, which is preferred by default over the NodeJS implementation. (This is useful when using hybrid platforms like nw.js or electron) (`false`, NodeJS only)
                    
230      - `localAddress` (`String`): the local IP address to connect to
                    
233    - **Websocket-only options**
                    
234      - `protocols` (`Array`): a list of subprotocols (see [MDN reference](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#Subprotocols))
                    
235- `send`
                    
                
index.js https://gitlab.com/ar2rsawseen/countly-server | JavaScript | 251 lines
                    
19
                    
20		this.onSocket = (s) => {
                    
21			this.socket = s;
                    
24		this.onError = (e) => {
                    
25			log.e('socket error %j', e);
                    
26		};
                    
42		this.agent = new https.Agent(this.options);
                    
43		this.agent.maxSockets = 1;
                    
44
                    
143			});
                    
144			req.on('socket', this.onSocket.bind(this));
                    
145			req.on('error', this.onError.bind(this));
                    
234		this._closed = true;
                    
235		if (this.socket) {
                    
236			this.socket.emit('agentRemove');
                    
                
client.rb https://gitlab.com/alx741/metasploit-framework | Ruby | 219 lines
                    
5
                    
6require 'rex/socket'
                    
7require 'thread'
                    
38
                    
39    self.sock = Rex::Socket::Udp.create(
                    
40      'PeerHost' => self.server_host,
                    
44
                    
45    self.monitor   = ::Thread.new { monitor_socket }
                    
46
                    
64
                    
65  def monitor_socket
                    
66    while true
                    
81      rescue ::Exception => e
                    
82        dprint("monitor_socket: #{e.class} #{e} #{e.backtrace}")
                    
83        break
                    
                
ping.c https://gitlab.com/SerenityS/msm8974_G2_render_kernel | C | 230 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.
                    
5 *
                    
6 *		"Ping" sockets
                    
7 *
                    
                
AwsIotMqttConnection.java https://gitlab.com/github-cloud-corp/aws-iot-device-sdk-java | Java | 170 lines
                    
46
                    
47    private final SocketFactory socketFactory;
                    
48
                    
53
                    
54    public AwsIotMqttConnection(AbstractAwsIotClient client, SocketFactory socketFactory, String serverUri)
                    
55            throws AWSIotException {
                    
57
                    
58        this.socketFactory = socketFactory;
                    
59
                    
146
                    
147    private MqttConnectOptions buildMqttConnectOptions(AbstractAwsIotClient client, SocketFactory socketFactory) {
                    
148        MqttConnectOptions options = new MqttConnectOptions();
                    
149
                    
150        options.setSocketFactory(socketFactory);
                    
151        options.setCleanSession(true);
                    
                
TrustingOkHttpClient.java https://gitlab.com/samuel-davis/DDF-TestSource | Java | 175 lines
                    
23import javax.net.ssl.SSLSession;
                    
24import javax.net.ssl.SSLSocketFactory;
                    
25import javax.net.ssl.TrustManager;
                    
84      // Create an ssl socket factory with our all-trusting manager
                    
85      final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
                    
86
                    
88
                    
89      builder.sslSocketFactory(sslSocketFactory);
                    
90
                    
                
control.hpp https://gitlab.com/vectorci/rippled | C++ Header | 182 lines
                    
10 *       documentation and/or other materials provided with the distribution.
                    
11 *     * Neither the name of the WebSocket++ Project nor the
                    
12 *       names of its contributors may be used to endorse or promote products
                    
27
                    
28#ifndef WEBSOCKET_CONTROL_MESSAGE_HPP
                    
29#define WEBSOCKET_CONTROL_MESSAGE_HPP
                    
34#include "../processors/processor.hpp"
                    
35#include "../websocket_frame.hpp"
                    
36#include "../utf8_validator/utf8_validator.hpp"
                    
38
                    
39using websocketpp_02::processor::hybi_util::circshift_prepared_key;
                    
40
                    
40
                    
41namespace websocketpp_02 {
                    
42namespace message {
                    
                
sandbox.c https://gitlab.com/0072016/Facebook-SDK- | C | 483 lines
                    
24#include <sys/resource.h>
                    
25#include <sys/socket.h>
                    
26#include <sys/stat.h>
                    
82  int sv[2];
                    
83  if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == -1) {
                    
84    perror("socketpair");
                    
232  // We need to close kZygoteIdFd before the child can continue. We use this
                    
233  // socketpair to tell the child when to continue;
                    
234  int sync_fds[2];
                    
234  int sync_fds[2];
                    
235  if (socketpair(AF_UNIX, SOCK_STREAM, 0, sync_fds)) {
                    
236    FatalError("Failed to create a socketpair");
                    
248        if (close(sync_fds[0]) || shutdown(sync_fds[1], SHUT_RD))
                    
249          FatalError("Could not close socketpair");
                    
250        // The kZygoteIdFd needs to be closed in the parent before
                    
                
eventtarget.rs https://gitlab.com/0072016/0072016-SDK-js-sdk-framework- | Rust | 349 lines
                    
51    Node(NodeTypeId),
                    
52    WebSocket,
                    
53    Window,
                    
                
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) {
                    
                
sendserver.c https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk | C | 520 lines
                    
234
                    
235	sockfd = socket (AF_INET, SOCK_DGRAM, 0);
                    
236	if (sockfd < 0)
                    
238		memset (secret, '\0', sizeof (secret));
                    
239		error("rc_send_server: socket: %s", strerror(errno));
                    
240		return (ERROR_RC);
                    
                
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;
                    
                
probe.js https://gitlab.com/lcuguen/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
                    
                
syscall_linux_riscv64.go https://gitlab.com/ipernet/gitlab-shell | Go | 209 lines
                    
81//sys	setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
                    
82//sysnb	socket(domain int, typ int, proto int) (fd int, err error)
                    
83//sysnb	socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
                    
                
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
                    
                
igs_linux.c https://gitlab.com/envieidoc/advancedtomato2 | C | 563 lines
                    
479 * Description: This function is called by Linux kernel when user
                    
480 *              applications sends a message on netlink socket. It
                    
481 *              dequeues the message, calls the functions to process
                    
483 *
                    
484 * Input:       skb  - Kernel socket structure
                    
485 */
                    
531	{
                    
532		IGS_ERROR("Netlink kernel socket create failed\n");
                    
533		return (FAILURE);
                    
549{
                    
550	sock_release(igs.nl_sk->sk_socket);
                    
551	igs_instances_clear();
                    
                
kqueue.go https://gitlab.com/unofficial-mirrors/kubernetes | Go | 503 lines
                    
187		// Don't watch sockets.
                    
188		if fi.Mode()&os.ModeSocket == os.ModeSocket {
                    
189			return "", nil
                    
                
http_proxy_client_socket_pool.h https://gitlab.com/brian0218/rk3066_r-box_android4.2.2_sdk | C Header | 265 lines
                    
18#include "net/http/proxy_client_socket.h"
                    
19#include "net/socket/client_socket_pool_base.h"
                    
20#include "net/socket/client_socket_pool_histograms.h"
                    
20#include "net/socket/client_socket_pool_histograms.h"
                    
21#include "net/socket/client_socket_pool.h"
                    
22
                    
38// must be set.
                    
39class HttpProxySocketParams : public base::RefCounted<HttpProxySocketParams> {
                    
40 public:
                    
225 private:
                    
226  typedef ClientSocketPoolBase<HttpProxySocketParams> PoolBase;
                    
227
                    
259
                    
260REGISTER_SOCKET_PARAMS_FOR_POOL(HttpProxyClientSocketPool,
                    
261                                HttpProxySocketParams);
                    
                
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();
                    
                
index.html https://gitlab.com/russitto/curso-node-mongo | HTML | 250 lines
                    
30
                    
31    <script src="/socket.io/socket.io.js"></script>
                    
32    <script type="text/javascript">
                    
32    <script type="text/javascript">
                    
33        var socket = io();
                    
34    </script>
                    
                
overload1.html https://gitlab.com/max-crow/rtbkit-deps-p | 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 https://gitlab.com/max-crow/rtbkit-deps-p | 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>
                    
                
filesystem.rb https://gitlab.com/orvi2014/rcs-db-ext | Ruby | 435 lines
                    
4
                    
5require 'socket'
                    
6require 'win32ole'
                    
354    def self.get_boot_time
                    
355      host = Socket.gethostname
                    
356      cs = "winmgmts://#{host}/root/cimv2"
                    
                
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 *
                    
                
live555-nosignal.patch https://gitlab.com/evilbinary/vlc | Patch | 139 lines
                    
21 Boolean RTPInterface::sendDataOverTCP(int socketNum, u_int8_t const* data, unsigned dataSize, Boolean forceSendToSucceed) {
                    
22-  int sendResult = send(socketNum, (char const*)data, dataSize, 0/*flags*/);
                    
23+  int sendResult = send(socketNum, (char const*)data, dataSize, MSG_NOSIGNAL);
                    
29 #endif
                    
30       makeSocketBlocking(socketNum, RTPINTERFACE_BLOCKING_WRITE_TIMEOUT_MS);
                    
31-      sendResult = send(socketNum, (char const*)(&data[numBytesSentSoFar]), numBytesRemainingToSend, 0/*flags*/);
                    
31-      sendResult = send(socketNum, (char const*)(&data[numBytesSentSoFar]), numBytesRemainingToSend, 0/*flags*/);
                    
32+      sendResult = send(socketNum, (char const*)(&data[numBytesSentSoFar]), numBytesRemainingToSend, MSG_NOSIGNAL);
                    
33       if ((unsigned)sendResult != numBytesRemainingToSend) {
                    
92   // Send the response header now, because we're about to add more data (the playlist):
                    
93-  send(fClientOutputSocket, (char const*)fResponseBuffer, strlen((char*)fResponseBuffer), 0);
                    
94+  send(fClientOutputSocket, (char const*)fResponseBuffer, strlen((char*)fResponseBuffer), MSG_NOSIGNAL);
                    
135-      = send(fOutputSocketNum, (const char*)&fBuffer[fUnwrittenBytesStart], numUnwrittenBytes(), 0);
                    
136+      = send(fOutputSocketNum, (const char*)&fBuffer[fUnwrittenBytesStart], numUnwrittenBytes(), MSG_NOSIGNAL);
                    
137     if (numBytesWritten < (int)numUnwrittenBytes()) {
                    
                
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)
                    
                
smc_clc.h https://gitlab.com/deepcypher/linux | C Header | 401 lines
                    
4 *
                    
5 *  CLC (connection layer control) handshake over initial TCP socket to
                    
6 *  prepare for RDMA traffic
                    
375
                    
376int smc_clc_prfx_match(struct socket *clcsock,
                    
377		       struct smc_clc_msg_proposal_prefix *prop);
                    
                
tcp.c https://gitlab.com/envieidoc/sprd_project | 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)
                    
                
signalr-tests.ts https://gitlab.com/CatchLabs/DefinitelyTyped | TypeScript | 197 lines
                    
22$.connection.hub.start({ transport: 'longPolling' });
                    
23$.connection.hub.start({ transport: ['webSockets', 'longPolling'] });
                    
24connection.start({ transport: 'longPolling' });
                    
24connection.start({ transport: 'longPolling' });
                    
25connection.start({ transport: ['webSockets', 'longPolling'] });
                    
26
                    
79    connection.start({ transport: 'longPolling' });
                    
80    connection.start({ transport: $.signalR.transports.webSockets });
                    
81    connection.start({ transport: ['longPolling', 'webSockets'] });
                    
                
addr.c https://gitlab.com/culot/kernel_lge_madai | 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
                    
                
rfcomm.h https://gitlab.com/pine64-android/linux-3.10 | 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);
                    
                
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))
                    
                
unix_domain_socket_posix.cc https://gitlab.com/f3822/qtwebengine-chromium | C++ | 196 lines
                    
37  socklen_t len = sizeof(user_cred);
                    
38  if (getsockopt(socket, SOL_SOCKET, SO_PEERCRED, &user_cred, &len) == -1)
                    
39    return false;
                    
140void UnixDomainSocket::Accept() {
                    
141  SocketDescriptor conn = StreamListenSocket::AcceptSocket();
                    
142  if (conn == kInvalidSocket)
                    
152  scoped_ptr<UnixDomainSocket> sock(
                    
153      new UnixDomainSocket(conn, socket_delegate_, auth_callback_));
                    
154  // It's up to the delegate to AddRef if it wants to keep it around.
                    
155  sock->WatchSocket(WAITING_READ);
                    
156  socket_delegate_->DidAccept(this, sock.PassAs<StreamListenSocket>());
                    
157}
                    
164
                    
165UnixDomainSocketFactory::~UnixDomainSocketFactory() {}
                    
166
                    
                
CMakeLists.txt https://gitlab.com/f3822/qttranslations | CMake | 155 lines
                    
105#add_ts_targets(qtsystems DIRECTORIES qtsystems/src)  # not released with qt
                    
106add_ts_targets(qtwebsockets DIRECTORIES qtwebsockets/src)
                    
107add_ts_targets(qtserialport DIRECTORIES qtserialport/src)
                    
                
client.cpp https://gitlab.com/f3822/qtbase | C++ | 162 lines
                    
61                                "Local Fortune Server example as well."))),
                    
62      socket(new QLocalSocket(this))
                    
63{
                    
84    connect(quitButton, &QPushButton::clicked, this, &Client::close);
                    
85    connect(socket, &QLocalSocket::readyRead, this, &Client::readFortune);
                    
86    connect(socket, &QLocalSocket::errorOccurred, this, &Client::displayError);
                    
102    socket->abort();
                    
103    socket->connectToServer(hostLineEdit->text());
                    
104}
                    
110        // sizeof(quint32) bytes
                    
111        if (socket->bytesAvailable() < (int)sizeof(quint32))
                    
112            return;
                    
131
                    
132void Client::displayError(QLocalSocket::LocalSocketError socketError)
                    
133{
                    
                
newcmdwin32.cc https://gitlab.com/alx741/sdcc | C++ | 633 lines
                    
96      shutdown((SOCKET)handle, SD_BOTH);
                    
97      closesocket((SOCKET)handle);
                    
98    }
                    
295
                    
296  if (INVALID_SOCKET != (sock = make_server_socket(serverport)))
                    
297    {
                    
310  ACCEPT_SOCKLEN_T size = sizeof(struct sockaddr);
                    
311  SOCKET newsock = accept((SOCKET)get_in_fd(), (struct sockaddr*)&sock_addr, &size);
                    
312
                    
312
                    
313  if (INVALID_SOCKET == newsock)
                    
314    {
                    
336    fprintf(stderr, "Can't open port for output\n");
                    
337  cl_channel ch_out = cl_channel(fp, CH_SOCKET);
                    
338
                    
                
Lifecycle.java https://gitlab.com/sphereon-sdk/pdf-sdk | Java | 188 lines
                    
2 * PDF 
                    
3 * <b>The PDF conversion API 'conversion2pdf' converts image, office and PDF files to (searcheable) PDF files.</b>    The flow is generally as follows:  1. First upload an image/file using the /conversion2pdf POST endpoint. You will get back a job response that contains a job with its associated settings.  2. Upload any additional images/files using the /conversion2pdf/{jobId} POST endpoint when you want to merge additional image, office or PDF files. You will get back the update job response that contains a job with its associated settings. Currently you can only merge spreadsheets with spreadsheet, documents with documents and images/pdfs with images/pdfs  3. Start the job from a PUT request to the /conversion2pdf/{jobid} endpoint, with the Job and Settings JSON as request body. The conversion to PDF will now start. The OCR setting is only applicable to images, since other files will always be searchable.  4. Check the job status from the /conversion2pdf/{jobid} GET endpoint until the status has changed to DONE or ERROR. Messaging using a websocket will be available as an alternative in a future version  5. Retrieve the PDF file using the /conversion2pdf/{jobid}/stream GET endpoint. This will return the PDF file only when the status is DONE. In other cases it will return the Job Response JSON (with http code 202 instead of 200)      <b>Interactive testing: </b>A web based test console is available in the <a href=\"https://store.sphereon.com\">Sphereon API Store</a>
                    
4 *
                    
                
module.py https://gitlab.com/unofficial-mirrors/ceph | Python | 410 lines
                    
9import os
                    
10import socket
                    
11import tempfile
                    
44            hc_self.server = server
                    
45            hc_self.socket = sock
                    
46            hc_self.rfile = makefile(sock, "rb", hc_self.rbufsize)
                    
161            'engine.autoreload.on': False,
                    
162            'server.socket_host': server_addr,
                    
163            'server.socket_port': int(server_port),
                    
175        uri = "https://{0}:{1}{2}/".format(
                    
176            socket.getfqdn() if server_addr == "::" else server_addr,
                    
177            server_port,
                    
                
WebSocketInterceptor.js https://gitlab.com/_bogdanova/up2u | JavaScript | 219 lines
                    
12
                    
13const RCTWebSocketModule = require('NativeModules').WebSocketModule;
                    
14const NativeEventEmitter = require('NativeEventEmitter');
                    
16
                    
17const originalRCTWebSocketConnect = RCTWebSocketModule.connect;
                    
18const originalRCTWebSocketSend = RCTWebSocketModule.send;
                    
18const originalRCTWebSocketSend = RCTWebSocketModule.send;
                    
19const originalRCTWebSocketSendBinary = RCTWebSocketModule.sendBinary;
                    
20const originalRCTWebSocketClose = RCTWebSocketModule.close;
                    
141    // then pass them through the `connectCallback`.
                    
142    RCTWebSocketModule.connect = function(url, protocols, options, socketId) {
                    
143      if (connectCallback) {
                    
204    RCTWebSocketModule.close = originalRCTWebSocketClose;
                    
205    RCTWebSocketModule.connect = originalRCTWebSocketConnect;
                    
206
                    
                
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                    }
                    
                
policy.h https://gitlab.com/deepcypher/linux | C Header | 311 lines
                    
19#include <linux/slab.h>
                    
20#include <linux/socket.h>
                    
21
                    
                
 

Source

Language