100+ results results for 'socket repo:razeto/lap' (951 ms)
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-relatedip.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.WS.js git://github.com/martensms/lycheeJS.git | JavaScript | 640 lines
14 /* 15 * WebSocket Framing Protocol 16 *addr.c https://gitlab.com/Krzyzanowski_Pawel/biosignal_gen | 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 errorReadme.md https://gitlab.com/DaviKaur/tutorials | 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});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;History.md https://gitlab.com/jeaster12/fabby | 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`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.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;PltSsdp.h https://gitlab.com/jothow/kodi | 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};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}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_Xgenl_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 familyREADME.md https://gitlab.com/RedDedVolvo/solidgoald | 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_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;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;tcp.c https://gitlab.com/pirej/UndineH20_XR2 | 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)README.md https://gitlab.com/hacongbang/pusher | 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```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 53AppDelegate.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);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">&</span> <span class="identifier">buffers</span><span class="special">);</span> 37 <span class="emphasis"><em>» <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">></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">&</span> <span class="identifier">buffers</span><span class="special">,</span>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); 103cu_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)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)netmsg.bas http://segin-utils.googlecode.com/svn/trunk/ | Basic | 577 lines
84' 85' Linux does NOT need socket library inits, unlike Windows... 86' 122function hOpen( byval proto as integer = IPPROTO_TCP ) as SOCKET export 123 dim s as SOCKET 124 153 154 function = bind( s, cast( PSOCKADDR, @sa ), len( sa ) ) <> SOCKET_ERROR 155 160 161 function = listen( s, timeout ) <> SOCKET_ERROR 162 165''::::: 166function hAccept( byval s as SOCKET, byval sa as sockaddr_in ptr ) as SOCKET export 167 dim salen as integersocket_option.hpp https://gitlab.com/NucleusStudios/SkyrimOnline | 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>SSDB.php https://gitlab.com/dleonov/my-framework-two | PHP | 576 lines
65 $timeout_f = (float)$timeout_ms/1000; 66 $this->sock = @stream_socket_client("$host:$port", $errno, $errstr, $timeout_f); 67 if(!$this->sock){HttpListenerPrefixCollection.cs https://gitlab.com/OriumVR/websocket-sharp | C# | 278 lines
43 44namespace WebSocketSharp.Net 45{inet_ntop.c https://gitlab.com/adam.lukaitis/Win32-OpenSSH | C | 211 lines
26#include <sys/types.h> 27#include <sys/socket.h> 28#include <netinet/in.h>ncpop3.pas https://openxp.svn.sourceforge.net/svnroot/openxp | Pascal | 479 lines
33 Netcall, { TNetcall } 34 NCSocket, { TSocketNetcall } 35 Classes, { TStringList } 38type 39 EPOP3 = class(ESocketNetcall); 40 41type 42 TPOP3 = class(TSocketNetcall) 43bluetooth_adapter_profile_bluez_unittest.cc git://github.com/chromium/chromium.git | C++ | 391 lines
163 // unowned pointer as expected to be used by clients of 164 // BluetoothAdapterBlueZ::UseProfile like BluetoothSocketBlueZ 165 BluetoothAdapterProfileBlueZ* profile_user_ptr_;mysqli_driver.php https://gitlab.com/betanurlaila/UI_onlineshop | PHP | 544 lines
118 { 119 // Do we have a socket path? 120 if ($this->hostname[0] === '/') 123 $port = NULL; 124 $socket = $this->hostname; 125 } 131 $port = empty($this->port) ? NULL : $this->port; 132 $socket = NULL; 133 } 201 202 if ($this->_mysqli->real_connect($hostname, $this->username, $this->password, $this->database, $port, $socket, $client_flags)) 203 {kqueue.go git://github.com/garyburd/gopkgdoc.git | Go | 503 lines
187 // Don't watch sockets. 188 if fi.Mode()&os.ModeSocket == os.ModeSocket { 189 return "", niltest_parse_cookies.c https://gitlab.com/karlson2k/libmicrohttpd-old | C | 260 lines
119 fd_set es; 120 MHD_socket maxsock; 121#ifdef MHD_WINSOCK_SOCKETS 121#ifdef MHD_WINSOCK_SOCKETS 122 int maxposixs; /* Max socket number unused on W32 */ 123#else /* MHD_POSIX_SOCKETS */ 124#define maxposixs maxsock 125#endif /* MHD_POSIX_SOCKETS */ 126 int running; 178 { 179 maxsock = MHD_INVALID_SOCKET; 180 maxposixs = -1;SocketImpl.h https://gitlab.com/cocoroac/walkingartists | C Header | 469 lines
49 50 virtual SocketImpl* acceptConnection(SocketAddress& clientAddr); 51 /// Get the next completed connection from the 370 SocketImpl(poco_socket_t sockfd); 371 /// Creates a SocketImpl using the given native socket. 372 401 void reset(poco_socket_t fd = POCO_INVALID_SOCKET); 402 /// Allows subclasses to set the socket manually, iff no valid socket is set yet. 403 420 SocketImpl(const SocketImpl&); 421 SocketImpl& operator = (const SocketImpl&); 422 437// 438inline poco_socket_t SocketImpl::sockfd() const 439{test.lisp https://gitlab.com/MatthewRock/ecl | Lisp | 256 lines
3 4;; This file is based on SBCL's SB-BSD-SOCKET module and has been 5;; heavily modified to work with ECL by Julian Stecklina. 5;; heavily modified to work with ECL by Julian Stecklina. 6;; Port to Windows Sockets contributed by M. Goffioul. 7 9 10;; Trivial stuff is copied from SBCL's SB-BSD-SOCKETS, which is also 11;; in the public domain. 14 15(load "sys:sockets") 16(load "../rt/rt") 17 18(use-package :sb-bsd-sockets) 19(use-package :sb-rt)NavigilProtocolDecoder.java https://bitbucket.org/josedaudi_/traccar.git | Java | 317 lines
27 28import java.net.SocketAddress; 29import java.nio.ByteOrder; 272 protected Object decode( 273 Channel channel, SocketAddress remoteAddress, Object msg) throws Exception { 274sock.c https://gitlab.com/Sean.W/pru-linux-drivers | C | 253 lines
32#include <linux/skbuff.h> 33#include <linux/socket.h> 34#include <linux/ioctl.h> 45 46static int cmtp_sock_release(struct socket *sock) 47{ 60 61static int cmtp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) 62{ 66 struct cmtp_conninfo ci; 67 struct socket *nsock; 68 void __user *argp = (void __user *)arg; 181 .connect = sock_no_connect, 182 .socketpair = sock_no_socketpair, 183 .accept = sock_no_accept,client.php https://gitlab.com/alexprowars/bitrix | PHP | 224 lines
23 24 const HTTP_SOCKET_TIMEOUT = 10; 25 const HTTP_STREAM_TIMEOUT = 10; 38 return new HttpClient(array( 39 'socketTimeout' => static::HTTP_SOCKET_TIMEOUT, 40 'streamTimeout' => static::HTTP_STREAM_TIMEOUT,ClusterListenerSupport.java https://gitlab.com/vipul.tiwari/hazelcast | Java | 288 lines
152 private Collection<InetSocketAddress> getSocketAddresses() { 153 final List<InetSocketAddress> socketAddresses = new LinkedList<InetSocketAddress>(); 154 156 for (Member member : memberList) { 157 socketAddresses.add(member.getSocketAddress()); 158 } 160 for (AddressProvider addressProvider : addressProviders) { 161 socketAddresses.addAll(addressProvider.loadAddresses()); 162 } 183 int attempt = 0; 184 Set<InetSocketAddress> triedAddresses = new HashSet<InetSocketAddress>(); 185 while (attempt < connectionAttemptLimit) { 218 private boolean connect(Set<InetSocketAddress> triedAddresses) throws Exception { 219 final Collection<InetSocketAddress> socketAddresses = getSocketAddresses(); 220 for (InetSocketAddress inetSocketAddress : socketAddresses) {openbsd-compat.h https://gitlab.com/adam.lukaitis/Win32-OpenSSH | C Header | 304 lines
36 37#include <sys/socket.h> 38 273 274/* rfc2553 socket API replacements */ 275#include "fake-rfc2553.h" 292# if __GLIBC_PREREQ(2, 15) && (_FORTIFY_SOURCE > 0) 293# include <sys/socket.h> /* Ensure include guard is defined */ 294# undef FD_SETtcp.c https://gitlab.com/tlevine/DragonFlyBSD | C | 305 lines
36#include <sys/types.h> 37#include <sys/socket.h> 38#include <sys/ioctl.h>WebSocketsConnectionHandlerTest.java git://github.com/WindowsAzure/azure-sdk-for-java.git | Java | 219 lines
38import static com.azure.core.amqp.implementation.handler.ConnectionHandler.PLATFORM; 39import static com.azure.core.amqp.implementation.handler.WebSocketsConnectionHandler.HTTPS_PORT; 40import static com.azure.core.amqp.implementation.handler.WebSocketsConnectionHandler.MAX_FRAME_SIZE; 45 46public class WebSocketsConnectionHandlerTest { 47 private static final ClientOptions CLIENT_OPTIONS = new ClientOptions(); 55 56 private WebSocketsConnectionHandler handler; 57 private ConnectionOptions connectionOptions; 72 CbsAuthorizationType.SHARED_ACCESS_SIGNATURE, "authorization-scope", 73 AmqpTransportType.AMQP_WEB_SOCKETS, new AmqpRetryOptions(), ProxyOptions.SYSTEM_DEFAULTS, 74 scheduler, CLIENT_OPTIONS, VERIFY_MODE, PRODUCT, CLIENT_VERSION); 189 190 try (WebSocketsConnectionHandler handler = new WebSocketsConnectionHandler(CONNECTION_ID, connectionOptions, 191 peerDetails)) {async_write_some.html git://github.com/MisterTea/HyperNEAT.git | HTML | 116 lines
7<link rel="home" href="../../../boost_asio.html" title="Boost.Asio"> 8<link rel="up" href="../basic_stream_socket.html" title="basic_stream_socket"> 9<link rel="prev" href="async_send/overload2.html" title="basic_stream_socket::async_send (2 of 2 overloads)"> 26<div class="titlepage"><div><div><h4 class="title"> 27<a name="boost_asio.reference.basic_stream_socket.async_write_some"></a><a class="link" href="async_write_some.html" title="basic_stream_socket::async_write_some">basic_stream_socket::async_write_some</a> 28</h4></div></div></div> 45<a name="boost_asio.reference.basic_stream_socket.async_write_some.h0"></a> 46 <span class="phrase"><a name="boost_asio.reference.basic_stream_socket.async_write_some.parameters"></a></span><a class="link" href="async_write_some.html#boost_asio.reference.basic_stream_socket.async_write_some.parameters">Parameters</a> 47 </h6> 80<a name="boost_asio.reference.basic_stream_socket.async_write_some.h1"></a> 81 <span class="phrase"><a name="boost_asio.reference.basic_stream_socket.async_write_some.remarks"></a></span><a class="link" href="async_write_some.html#boost_asio.reference.basic_stream_socket.async_write_some.remarks">Remarks</a> 82 </h6> 89<a name="boost_asio.reference.basic_stream_socket.async_write_some.h2"></a> 90 <span class="phrase"><a name="boost_asio.reference.basic_stream_socket.async_write_some.example"></a></span><a class="link" href="async_write_some.html#boost_asio.reference.basic_stream_socket.async_write_some.example">Example</a> 91 </h6>overload1.html git://github.com/MisterTea/HyperNEAT.git | HTML | 116 lines
26<div class="titlepage"><div><div><h5 class="title"> 27<a name="boost_asio.reference.basic_raw_socket.async_receive.overload1"></a><a class="link" href="overload1.html" title="basic_raw_socket::async_receive (1 of 2 overloads)">basic_raw_socket::async_receive 28 (1 of 2 overloads)</a> 30<p> 31 Start an asynchronous receive on a connected socket. 32 </p> 45<a name="boost_asio.reference.basic_raw_socket.async_receive.overload1.h0"></a> 46 <span class="phrase"><a name="boost_asio.reference.basic_raw_socket.async_receive.overload1.parameters"></a></span><a class="link" href="overload1.html#boost_asio.reference.basic_raw_socket.async_receive.overload1.parameters">Parameters</a> 47 </h6> 80<a name="boost_asio.reference.basic_raw_socket.async_receive.overload1.h1"></a> 81 <span class="phrase"><a name="boost_asio.reference.basic_raw_socket.async_receive.overload1.remarks"></a></span><a class="link" href="overload1.html#boost_asio.reference.basic_raw_socket.async_receive.overload1.remarks">Remarks</a> 82 </h6> 89<a name="boost_asio.reference.basic_raw_socket.async_receive.overload1.h2"></a> 90 <span class="phrase"><a name="boost_asio.reference.basic_raw_socket.async_receive.overload1.example"></a></span><a class="link" href="overload1.html#boost_asio.reference.basic_raw_socket.async_receive.overload1.example">Example</a> 91 </h6>rai.js https://gitlab.com/imxieke/Ghost | JavaScript | 480 lines
137 * 138 * <p>{@link RAISocket} object instance is created based on the client socket 139 * and a <code>'connection'</code> event is emitted</p> 140 * 141 * @param {Object} socket The socket to the client 142 */ 155 socket.setKeepAlive(true); // plaintext server 156 }else if(socket.encrypted && "setKeepAlive" in socket.encrypted){ 157 socket.encrypted.setKeepAlive(true); // secure server 300 301 this.socket = ssl_socket; 302 this.socket.on("data", this._onReceiveData.bind(this)); 461 if(this.options.disconnectOnTimeout){ 462 if(this.socket && !this.socket.destroyed){ 463 this.socket.end();sysdeps.h https://gitlab.com/adam.lukaitis/Team-Win-Recovery-Project | C Header | 494 lines
167 168/* normally provided by <cutils/sockets.h> */ 169extern int socket_loopback_client(int port, int type); 170extern int socket_network_client(const char *host, int port, int type); 171extern int socket_loopback_server(int port, int type); 172extern int socket_inaddr_any_server(int port, int type); 223 224extern int adb_socketpair( int sv[2] ); 225 259#include "fdevent.h" 260#include <cutils/sockets.h> 261#include <cutils/properties.h> 458#undef socketpair 459#define socketpair ___xxx_socketpair 460SocketStream.cc https://freespeech.svn.sourceforge.net/svnroot/freespeech | C++ | 558 lines
280 if((m_listen_socket = socket(PF_INET, SOCK_STREAM, 0)) == -1) { 281 perror("network_socket::init_tcp_stream : call to socket() failed; socket not created."); 282 throw new GeneralException("network_socket::init_tcp_stream : socket not created.",__FILE__,__LINE__); 324 325 throw new GeneralException("network_socket::init_tcp_stream : could not set flags (O_NONBLOCK) of the socket." 326 ,__FILE__,__LINE__); 333 334 if(setsockopt(m_listen_socket, SOL_SOCKET, SO_REUSEADDR, (const char*)&one, sizeof(one))) { 335 356 357 perror ("network_socket::init_tcp_stream : bind() failed; socket not created."); 358 shutdown(); 446 if((m_write_socket = socket(PF_INET, SOCK_STREAM, 0)) < 0) { 447 perror("network_socket::connect(): socket() failed"); 448 throw new GeneralException("network_socket::connect connect() failed",__FILE__,__LINE__);stub_dev.c http://wl500g.googlecode.com/svn/trunk/ | C | 544 lines
87 int sockfd = 0; 88 struct socket *socket; 89 107 108 socket = sockfd_to_socket(sockfd); 109 if (!socket) { 112 } 113 sdev->ud.tcp_socket = socket; 114 186 if (ud->tcp_socket) { 187 dev_dbg(&sdev->udev->dev, "shutdown tcp_socket %p\n", 188 ud->tcp_socket); 188 ud->tcp_socket); 189 ud->tcp_socket->ops->shutdown(ud->tcp_socket, SEND_SHUTDOWN|RCV_SHUTDOWN); 190 }README.md https://gitlab.com/AmbassadorsLab/Timesync-Client | Markdown | 538 lines
15 16The Timesync Client is used to establish a websocket connection to the Timesync Server, which in turn initiates a series of ping requests to establish the time offset between the server and the client, regardless of network delay or instability. Once the server has reached confidence it has established the offset, it will notify the client and pass it the offset. 17 17 18The Client and Server communicate with eachother by sending Messages over the websocket connection. In general, Messages contain a unique id, a timestamp that gets set when dispatched, a message type and message body. The type is used to trigger specific behaviour on either end and the body contains any type of JSON serializable content. The Client can either register message handlers to act on incoming messages, or attach a callback and scope to outgoing messages. 19 175 176<a name="client.connect"></a>**connect** (server, port) : Websocket Connection 177Initiates a connection to the server. If no server and port parameters are provided it will grab them from the initial client config. 183Returns: 184- Websocket Connection 185 220 221<a name="client.getconnection"></a>**getConnection** ( ) : Websocket Connection 222Method to return the current websocket connection.DefaultHostnameVerifier.SSLSocketFactory.html http://vt-middleware.googlecode.com/svn/ | HTML | 142 lines
7<TITLE> 8Uses of Class edu.vt.middleware.ldap.ssl.DefaultHostnameVerifier.SSLSocketFactory (VT LDAP Libraries 3.3.5 API) 9</TITLE> 16{ 17 parent.document.title="Uses of Class edu.vt.middleware.ldap.ssl.DefaultHostnameVerifier.SSLSocketFactory (VT LDAP Libraries 3.3.5 API)"; 18} 38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../edu/vt/middleware/ldap/ssl/DefaultHostnameVerifier.SSLSocketFactory.html" title="class in edu.vt.middleware.ldap.ssl"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD> 40 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD> 57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 58 <A HREF="../../../../../../index.html?edu/vt/middleware/ldap/ssl/class-use/DefaultHostnameVerifier.SSLSocketFactory.html" target="_top"><B>FRAMES</B></A> 59 <A HREF="DefaultHostnameVerifier.SSLSocketFactory.html" target="_top"><B>NO FRAMES</B></A> 80<H2> 81<B>Uses of Class<br>edu.vt.middleware.ldap.ssl.DefaultHostnameVerifier.SSLSocketFactory</B></H2> 82</CENTER>TLSSocketFactoryTest.java http://vt-middleware.googlecode.com/svn/ | Java | 209 lines
120 final TLSSocketFactory sf = 121 (TLSSocketFactory) ldap.getLdapConfig().getSslSocketFactory(); 122 148 AssertJUnit.assertEquals( 149 Arrays.asList(((SSLSocket) sf.createSocket()).getEnabledCipherSuites()), 150 Arrays.asList(CIPHERS)); 161 final TLSSocketFactory sf = 162 (TLSSocketFactory) ldap.getLdapConfig().getSslSocketFactory(); 163 169 AssertJUnit.assertNotSame( 170 Arrays.asList(((SSLSocket) sf.createSocket()).getEnabledProtocols()), 171 Arrays.asList(PROTOCOLS)); 203 AssertJUnit.assertEquals( 204 Arrays.asList(((SSLSocket) sf.createSocket()).getEnabledProtocols()), 205 Arrays.asList(PROTOCOLS));Makefile git://pkgs.fedoraproject.org/openvas-client | Makefile | 304 lines
7 $(RUN_LIBS) $(C_R_LIB) -lm \ 8 $(DL_LIB) -lz $(SOCKET_LIB) $(LIBOPENVAS_LIBS) 9 81 ../src/util/openvas_lsc_target_prep.o\ 82 ../src/util/openvas-socket.o 83rxecho.c git://pkgs.fedoraproject.org/ax25-tools | C | 518 lines
36 * - sockaddr_pkt is the right struct for recvfrom/sendto on 37 * type SOCK_PACKET family AF_INET sockets. 38 * - added support for new PF_PACKET family with sockaddr_ll 67 68#include <sys/socket.h> 69 72 * uncomment this if you have problems with sockaddr_pkt. 73 * sockaddr_pkt is the right way for type SOCK_PACKET on family AF_INET sockets. 74 * especially because the "sockaddr" on recvfrom is truncated (internaly 414#ifdef USE_SOCKADDR_SLL 415 if ((s = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_AX25))) == -1) { 416#else 416#else 417 if ((s = socket(AF_INET, SOCK_PACKET, htons(ETH_P_AX25))) == -1) { 418#endifgnuslib.c git://pkgs.fedoraproject.org/xemacs | C | 467 lines
203 204#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS) 205/* 260 connect_to_unix_server -- establish connection with server process via a unix- 261 domain socket. Returns socket descriptor for server 262 if successful. 323 connect_to_internet_server -- establish connection with server process via 324 an internet domain socket. Returns socket 325 descriptor for server if successful. 405 406#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS) 407/* 465} /* disconnect_from_server */ 466#endif /* INTERNET_DOMAIN_SOCKETS || UNIX_DOMAIN_SOCKETS */ 467process.c git://github.com/FooBarWidget/passenger.git | C | 525 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); 204Server.vala http://libzee.googlecode.com/svn/trunk/ | Vala | 215 lines
55 */ 56 protected InetSocketAddress _address; 57 /** 57 /** 58 * Server's socket service 59 */ 59 */ 60 protected ThreadedSocketService _service; 61 90 91 this._address = new InetSocketAddress(addr, port); 92 this._max_threads = max_threads; 135 // [TODO]: Wrap the generic GLib error 136 this._service.add_address(this._address, SocketType.STREAM, SocketProtocol.TCP, null, null); 137RakNetSocket2.cpp https://gitlab.com/computerphilly/openblox | C++ | 513 lines
63RNS2Type RakNetSocket2::GetSocketType(void) const {return socketType;} 64void RakNetSocket2::SetSocketType(RNS2Type t) {socketType=t;} 65bool RakNetSocket2::IsBerkleySocket(void) const { 125 126unsigned int RakNetSocket2::GetUserConnectionSocketIndex(void) const {return userConnectionSocketIndex;} 127void RakNetSocket2::SetUserConnectionSocketIndex(unsigned int i) {userConnectionSocketIndex=i;} 296#if defined(__APPLE__) 297void SocketReadCallback(CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const void *data, void *info) 298// This C routine is called by CFSocket when there's data waiting on our 328 const CFSocketContext context = { 0, this, NULL, NULL, NULL }; 329 _cfSocket = CFSocketCreateWithNative(NULL, rns2Socket, kCFSocketReadCallBack, SocketReadCallback, &context); 330#endif 435const RNS2_BerkleyBindParameters *RNS2_Berkley::GetBindings(void) const {return &binding;} 436RNS2Socket RNS2_Berkley::GetSocket(void) const {return rns2Socket;} 437// See RakNetSocket2_Berkley.cpp for WriteSharedIPV4, BindSharedIPV4And6 and other implementationsio_handler_buffer_helper.cc git://pkgs.fedoraproject.org/mediatomb | C++ | 231 lines
62 signalAfterEveryRead = false; 63 checkSocket = false; 64 97 { 98 if (checkSocket) 99 { 99 { 100 checkSocket = false; 101 return CHECK_SOCKET;spacewalk-channel.py git://pkgs.fedoraproject.org/rhn-client-tools | Python | 163 lines
18import re 19import socket 20import sysConnectionSettingsTest.java git://pkgs.fedoraproject.org/qpid-cpp | Java | 175 lines
110 { 111 systemPropertyOverrideForSocketBufferSize(ClientProperties.SEND_BUFFER_SIZE_PROP_NAME, 1024, false); 112 } 116 { 117 systemPropertyOverrideForSocketBufferSize(ClientProperties.LEGACY_SEND_BUFFER_SIZE_PROP_NAME, 1024, false); 118 } 126 { 127 systemPropertyOverrideForSocketBufferSize(ClientProperties.RECEIVE_BUFFER_SIZE_PROP_NAME, 1024, true); 128 } 132 { 133 systemPropertyOverrideForSocketBufferSize(ClientProperties.LEGACY_RECEIVE_BUFFER_SIZE_PROP_NAME, 1024, true); 134 } 154 155 private void systemPropertyOverrideForSocketBufferSize(String propertyName, int value, boolean read) 156 {hydra-cisco-enable.c git://pkgs.fedoraproject.org/hydra | C | 194 lines
66 67 hydra_register_socket(sp); 68 if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)karma.js https://gitlab.com/hemantr/NetBeansProjects | JavaScript | 407 lines
146 if (resultsBuffer.length) { 147 socket.emit('result', resultsBuffer) 148 resultsBuffer = [] 156 157 socket.emit('complete', result || {}, function () { 158 if (returnUrl) { 225 socket.on('connect', function () { 226 currentTransport = socket.socket.transport.name 227 228 // TODO(vojta): make resultsBufferLimit configurable 229 if (currentTransport === 'websocket' || currentTransport === 'flashsocket') { 230 resultsBufferLimit = 1 254// connect socket.io 255// https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO 256var socket = io.connect(location.protocol + '//' + location.host, {RedisClient.cs git://github.com/ccollie/Guanima.Redis.git | C# | 432 lines
238 239 #region Sockets 240 240 241 internal void DisposeSocket(PooledSocket socket) 242 { 242 { 243 if (socket != null) 244 ((IDisposable)socket).Dispose();main.c git://pkgs.fedoraproject.org/net-snmp | C | 540 lines
64int Aflag; /* show addresses of protocol control block */ 65int aflag; /* show all sockets (including servers) */ 66int bflag; /* show bytes instead of packets */ 199 /* case 'l': OpenBSD: Wider IPv6 display 200 Linux: Listening sockets only 201 lflag = 1; 271 break; 272 case 'u': OpenBSD: unix sockets only 273 af = AF_UNIX;wayland-client.c git://pkgs.fedoraproject.org/wayland | C | 586 lines
30#include <unistd.h> 31#include <sys/socket.h> 32#include <sys/un.h> 303static int 304connect_to_socket(struct wl_display *display, const char *name) 305{ 310 311 display->fd = wl_os_socket_cloexec(PF_LOCAL, SOCK_STREAM, 0); 312 if (display->fd < 0) 360 memset(display, 0, sizeof *display); 361 connection = getenv("WAYLAND_SOCKET"); 362 if (connection) { 370 fcntl(display->fd, F_SETFD, flags | FD_CLOEXEC); 371 unsetenv("WAYLAND_SOCKET"); 372 } else if (connect_to_socket(display, name) < 0) {myleftchatluadb.as http://as3chat.googlecode.com/svn/trunk/ | ActionScript | 430 lines
33 { 34 private var socket:SocketConnection; 35 private var host:String = 'myleft.org'; 193 194 socket = new SocketConnection; 195 socket.addEventListener(Define.CONNECT, eventHandle); 333 { 334 if (!socket.socket.connected) { 335 progressDialog.setTitle('???...'); 405 { 406 if (socket.socket.connected) socket.send('<quit/>'); 407 } 414 } 415 else if (socket.socket.connected && messageText.getText().length>0) 416 {websocket_handshake_stream_base.h git://github.com/chromium/chromium.git | C Header | 157 lines
4 5#ifndef NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_STREAM_BASE_H_ 6#define NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_STREAM_BASE_H_ 20#include "net/http/http_stream.h" 21#include "net/websockets/websocket_deflate_parameters.h" 22#include "net/websockets/websocket_stream.h" 75 // Server responded to WebSocket request over an HTTP/2 connection with 76 // invalid sec-websocket-extensions header. 77 HTTP2_FAILED_EXTENSIONS = 14, 101 bool using_proxy, 102 WebSocketEndpointLockManager* websocket_endpoint_lock_manager) = 0; 103 156 157#endif // NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_STREAM_BASE_H_ 158mod_storage_sql1.lua git://github.com/bjc/prosody.git | Lua | 415 lines
29local json = require "util.json"; 30local build_url = require"socket.url".build; 31syscall_table.S https://gitlab.com/Sean.W/pru-linux-drivers | Assembly | 427 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)nonroot.html https://code.google.com/p/bugzilla4intranet/ | HTML | 745 lines
188datadir=/home/foo/mymysql 189socket=/home/foo/mymysql/thesock 190port=8081 192[mysql] 193socket=/home/foo/mymysql/thesock 194port=8081NioServer.java http://wastelanders.googlecode.com/svn/trunk/ | Java | 396 lines
90 */ 91 private Map<SocketChannel, List<ByteBuffer>> pendingData = new HashMap<SocketChannel, List<ByteBuffer>>(); 92 279 // channel. 280 ServerSocketChannel serverSocketChannel = (ServerSocketChannel) key.channel(); 281 282 // Accept the connection and make it non-blocking 283 SocketChannel socketChannel = serverSocketChannel.accept(); 284 socketChannel.configureBlocking(false); 293 private void read(SelectionKey key) { 294 SocketChannel socketChannel = (SocketChannel) key.channel(); 295 328 private void write(SelectionKey key) { 329 SocketChannel socketChannel = (SocketChannel) key.channel(); 330xprt.h https://github.com/mdombroski/linux-2.6.git | C Header | 407 lines
12#include <linux/uio.h> 13#include <linux/socket.h> 14#include <linux/in.h>cluster.go https://code.google.com/p/camlistore/ | Go | 482 lines
132 133 socket, err := server.AcquireSocket() 134 if err != nil { 134 if err != nil { 135 log("SYNC Failed to get socket to ", addr, ": ", err.Error()) 136 return 138 139 // Monotonic will let us talk to a slave and still hold the socket. 140 session := newSession(Monotonic, cluster, socket, 10 * time.Second) 412 413// AcquireSocket returns a socket to a server in the cluster. If slaveOk is 414// true, it will attempt to return a socket to a slave server. If it is 415// false, the socket will necessarily be to a master server. 416func (cluster *mongoCluster) AcquireSocket(slaveOk bool, syncTimeout time.Duration) (s *mongoSocket, err error) { 417 started := time.Now()ThriftSyncConnectionFactoryImpl.java git://github.com/Netflix/astyanax.git | Java | 293 lines
45import org.apache.thrift.transport.TFramedTransport; 46import org.apache.thrift.transport.TSocket; 47import org.apache.thrift.transport.TTransportException; 84 private TFramedTransport transport; 85 private TSocket socket; 86 private int timeout = 0; 96 long latency = 0; 97 setTimeout(cpConfig.getSocketTimeout()); // In case the 98 // configuration 155 try { 156 socket = new TSocket(getHost().getIpAddress(), getHost().getPort(), cpConfig.getConnectTimeout()); 157 socket.getSocket().setTcpNoDelay(true); 158 socket.getSocket().setKeepAlive(true); 159 socket.getSocket().setSoLinger(false, 0); 160Download.php https://gitlab.com/daigiangaitu91/magento | PHP | 287 lines
135 /** 136 * Retrieve Resource file handle (socket, file pointer etc) 137 *octwin.inc https://openxp.svn.sourceforge.net/svnroot/openxp | Pascal | 218 lines
59function TTelnetObj.Connect(Dest: String): Boolean; 60const isocket: TInetSockAddr= (Family:AF_INET;Port:$274E;Addr:$0100A8C0); 61begin 62 Connect:=False; 63 SHandle:=Socket(AF_INET,SOCK_STREAM,0); 64 if SocketError<>0 then begin ErrorStr:='Error opening socket'; exit end; 64 if SocketError<>0 then begin ErrorStr:='Error opening socket'; exit end; 65 if not Sockets.Connect(SHandle,isocket,SIn,SOut)then begin ErrorStr:='Error connecting socket'; exit end; 66 ReWrite(sout); Reset(sin); SOpened:=True; Connect:=True;Makefile.in git://pkgs.fedoraproject.org/kbilliards | Autoconf | 447 lines
124LIBSM = @LIBSM@ 125LIBSOCKET = @LIBSOCKET@ 126LIBTOOL = @LIBTOOL@reader.js https://gitlab.com/boxnia/NFU_MOVIL | JavaScript | 255 lines
72 73 case 'Socket': 74 ClassType = require('./socket-reader.js')xpc_partition.c git://github.com/torvalds/linux.git | C | 534 lines
146 } 147 rp = (struct xpc_rsvd_page *)__va(xp_socket_pa(rp_pa)); 148Client.php https://gitlab.com/JrLucena/moodle | PHP | 212 lines
2 3namespace Horde\Socket; 4 13 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 14 * @package Socket_Client 15 */ 17/** 18 * Utility interface for establishing a stream socket client. 19 * 23 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 24 * @package Socket_Client 25 * 70 * 71 * @throws Horde\Socket\Client\Exception 72 */basic_endpoint.hpp https://gitlab.com/sebastien.matte83/Cinder | C++ Header | 239 lines
20 21#if defined(ASIO_HAS_LOCAL_SOCKETS) \ 22 || defined(GENERATING_DOCUMENTATION) 34 35/// Describes an endpoint for a UNIX socket. 36/** 37 * The asio::local::basic_endpoint class template describes an endpoint 38 * that may be associated with a particular UNIX socket. 39 * 54 /// The type of the endpoint structure. This type is dependent on the 55 /// underlying implementation of the socket layer. 56#if defined(GENERATING_DOCUMENTATION) 58#else 59 typedef asio::detail::socket_addr_type data_type; 60#endifavio_dir_cmd.c https://gitlab.com/sjchen1981/FFmpeg | C | 180 lines
41 return "<LINK>"; 42 case AVIO_ENTRY_SOCKET: 43 return "<SOCKET>";suite.pm https://gitlab.com/Cona/server | Perl | 77 lines
57 qr(WSREP: .*Failed to open channel 'my_wsrep_cluster' at .*), 58 qr(WSREP: gcs connect failed: Socket type not supported), 59 qr(WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 .*),SnakeWebSocketHandler.java https://gitlab.com/perlilja/spring-boot | Java | 112 lines
17 18package samples.websocket.undertow.snake; 19 24 25import org.springframework.web.socket.CloseStatus; 26import org.springframework.web.socket.TextMessage; 26import org.springframework.web.socket.TextMessage; 27import org.springframework.web.socket.WebSocketSession; 28import org.springframework.web.socket.handler.TextWebSocketHandler; 29 30public class SnakeWebSocketHandler extends TextWebSocketHandler { 31 64 65 public SnakeWebSocketHandler() { 66 this.id = snakeIds.getAndIncrement();SnakeWebSocketHandler.java https://gitlab.com/perlilja/spring-boot | Java | 112 lines
17 18package samples.websocket.tomcat.snake; 19 24 25import org.springframework.web.socket.CloseStatus; 26import org.springframework.web.socket.TextMessage; 26import org.springframework.web.socket.TextMessage; 27import org.springframework.web.socket.WebSocketSession; 28import org.springframework.web.socket.handler.TextWebSocketHandler; 29 30public class SnakeWebSocketHandler extends TextWebSocketHandler { 31 64 65 public SnakeWebSocketHandler() { 66 this.id = snakeIds.getAndIncrement();bufferutil.cc https://gitlab.com/jeaster12/fabby | C++ | 120 lines
1/*! 2 * bufferutil: WebSocket buffer utils 3 * Copyright(c) 2015 Einar Otto Stangvik <einaros@gmail.com>network-threadedfortuneserver.html git://pkgs.fedoraproject.org/mingw-qt | HTML | 150 lines
86 <span class="keyword">signals</span>: 87 <span class="type">void</span> error(<span class="type"><a href="qtcpsocket.html">QTcpSocket</a></span><span class="operator">::</span>SocketError socketError); 88 94<pre class="cpp"> FortuneThread<span class="operator">::</span>FortuneThread(<span class="type">int</span> socketDescriptor<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qstring.html">QString</a></span> <span class="operator">&</span>fortune<span class="operator">,</span> <span class="type"><a href="qobject.html">QObject</a></span> <span class="operator">*</span>parent) 95 : <span class="type"><a href="qthread.html">QThread</a></span>(parent)<span class="operator">,</span> socketDescriptor(socketDescriptor)<span class="operator">,</span> text(fortune) 96 { 101 <span class="type"><a href="qtcpsocket.html">QTcpSocket</a></span> tcpSocket;</pre> 102<p>The first thing our run() function does is to create a <a href="qtcpsocket.html">QTcpSocket</a> object on the stack. What's worth noticing is that we are creating this object inside the thread, which automatically associates the socket to the thread's event loop. This ensures that Qt will not try to deliver events to our socket from the main thread while we are accessing it from FortuneThread::run().</p> 103<pre class="cpp"> <span class="keyword">if</span> (<span class="operator">!</span>tcpSocket<span class="operator">.</span>setSocketDescriptor(socketDescriptor)) { 106 }</pre> 107<p>The socket is initialized by calling <a href="qabstractsocket.html#setSocketDescriptor">QTcpSocket::setSocketDescriptor</a>(), passing our socket descriptor as an argument. We expect this to succeed, but just to be sure, (although unlikely, the system may run out of resources,) we catch the return value and report any error.</p> 108<pre class="cpp"> <span class="type"><a href="qbytearray.html">QByteArray</a></span> block; 119 }</pre> 120<p>But unlike the previous example, we finish off by calling <a href="qabstractsocket.html#waitForDisconnected">QTcpSocket::waitForDisconnected</a>(), which blocks the calling thread until the socket has disconnected. Because we are running in a separate thread, the GUI will remain responsive.</p> 121</div>topology_map.py git://pkgs.fedoraproject.org/mysql-utilities | Python | 340 lines
63 self.num_retries = options.get("num_retries", 0) 64 self.socket_path = options.get("socket_path", None) 65 self.seed_server = seed_server 94 95 # Clear socket if used with a local server 96 if (conn['host'] == 'localhost' or \ 97 conn['host'] == "127.0.0.1"): 98 conn['unix_socket'] = None 99SynchConnection.java https://github.com/parag/jredis.git | Java | 178 lines
81 * <p> 82 * This constructor will open the socket connection immediately. 83 * 86 * @throws ClientRuntimeException due to either dns (host connectivity) or any IO issues related to establishing 87 * the socket connection to the specified server. 88 * @throws ProviderException if the version specified is not supported.id.po.in git://git.savannah.gnu.org/gsasl.git | Autoconf | 249 lines
50#, c-format 51msgid "Cannot initialize Windows sockets." 52msgstr "Tidak dapat menginisialisasi soket Windows."tcp.c http://wl500g.googlecode.com/svn/trunk/ | C | 312 lines
51*/ 52RC_TYPE tcp_destruct(TCP_SOCKET *p_self) 53{ 107 { 108 p_self->super.socket = socket(AF_INET, SOCK_STREAM, 0); 109 if (p_self->super.socket == -1) 110 { 111 int code = os_get_socket_error(); 112 128 logit(LOG_WARNING, MODULE_TAG "Failed binding client socket to local address: %s", strerror(code)); 129 rc = RC_IP_SOCKET_BIND_ERROR; 130 break; 143 setsockopt(p_self->super.socket, SOL_SOCKET, SO_RCVTIMEO, &sv, svlen); 144 setsockopt(p_self->super.socket, SOL_SOCKET, SO_SNDTIMEO, &sv, svlen); 145OutputBufferProcessor.java git://github.com/Graylog2/graylog2-server.git | Java | 155 lines
1/** 2 * Copyright 2012 Lennart Koopmann <lennart@socketfeed.com> 3 * 51/** 52 * @author Lennart Koopmann <lennart@socketfeed.com> 53 */test_term_endpoint.cpp git://github.com/zeromq/libzmq.git | C++ | 183 lines
35/* Use the worst case filename size for the buffer (+1 for trailing NUL), this 36 * is larger than MAX_SOCKET_STRING, which is not large enough for IPC */ 37#define BUF_SIZE (FILENAME_MAX + 1) 51 // Create infrastructure. 52 void *push = test_context_socket (ZMQ_PUSH); 53 bind_loopback_ipv4 (push, my_endpoint, BUF_SIZE); 54 55 void *pull = test_context_socket (ZMQ_PULL); 56 TEST_ASSERT_SUCCESS_ERRNO (zmq_connect (pull, my_endpoint)); 71 // Clean up 72 test_context_socket_close (pull); 73 test_context_socket_close (push); 78 // Create infrastructure 79 void *pull = test_context_socket (ZMQ_PULL); 80 char my_endpoint[BUF_SIZE];server.js https://gitlab.com/angtrim/gaia-back-due | JavaScript | 437 lines
46 * @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) 47 * @param {object} [options.socketOptions=null] Socket options 48 * @param {boolean} [options.socketOptions.autoReconnect=false] Reconnect on error. 48 * @param {boolean} [options.socketOptions.autoReconnect=false] Reconnect on error. 49 * @param {boolean} [options.socketOptions.noDelay=true] TCP Socket NoDelay option. 50 * @param {number} [options.socketOptions.keepAlive=0] TCP KeepAlive on the socket with a X ms delay before start. 51 * @param {number} [options.socketOptions.connectTimeoutMS=0] TCP Connection timeout setting 52 * @param {number} [options.socketOptions.socketTimeoutMS=0] TCP Socket timeout setting 53 * @param {number} [options.reconnectTries=30] Server attempt to reconnect #times 98 99 // Socket options passed down 100 if(options.socketOptions) { 106 if(options.socketOptions.socketTimeoutMS) { 107 clonedOptions.socketTimeout = options.socketOptions.socketTimeoutMS; 108 }main.cpp https://bitbucket.org/AIBMI/trodes.git | C++ | 228 lines
40 41SocketInfo server_message[MAX_CONNECTIONS]; // the structure for the server messaging 42SocketInfo client_message[MAX_CONNECTIONS]; // the structure for the client messaging 42SocketInfo client_message[MAX_CONNECTIONS]; // the structure for the client messaging 43SocketInfo server_data[MAX_CONNECTIONS]; // the structure for receiving data 44SocketInfo client_data[MAX_CONNECTIONS]; // the structure for sendin data (currently unused) 206 sleep(1); 207 CloseSockets(server_message); 208 CloseSockets(client_message); 208 CloseSockets(client_message); 209 CloseSockets(server_data); 210 fclose(STATUSFILE);openvswitch.m4 git://pkgs.fedoraproject.org/openvswitch | m4 | 357 lines
53 [HAVE_NETLINK=no], 54 [#include <sys/socket.h> 55 #include <linux/types.h> 98 99dnl Checks for libraries needed by lib/socket-util.c. 100AC_DEFUN([OVS_CHECK_SOCKET_LIBS], 100AC_DEFUN([OVS_CHECK_SOCKET_LIBS], 101 [AC_CHECK_LIB([socket], [connect]) 102 AC_SEARCH_LIBS([gethostbyname], [resolv], [RESOLVER_LIBS=-lresolv])])net.c git://pkgs.fedoraproject.org/xconvers | C | 459 lines
73 connecttimeout = TRUE; 74 close(sockethandle); 75 251 252 res = getsockopt(sockethandle, SOL_SOCKET, SO_ERROR, &option, &size); 253 330 331 if ((sockethandle = socket (AF_INET, SOCK_STREAM, 0)) == -1) 332 { 339 /* send keepalive probes */ 340 setsockopt(sockethandle, SOL_SOCKET, SO_KEEPALIVE, (gchar *)&opt, sizeof(opt)); 341 /* make connection setup non-blocking */ 366 /* connection is non-blocking, so we set up a monitor to see if connection is succesful */ 367 connectmonitor = gdk_input_add(sockethandle, GDK_INPUT_WRITE, GTK_SIGNAL_FUNC(socket_connected), NULL); 368}alsaio.cpp git://pkgs.fedoraproject.org/kdenetwork | C++ | 558 lines
21#include <QObject> 22#include <QSocketNotifier> 23#include <QStringList> 296 { 297 close(notifier->socket()); 298 delete notifier; 365 //Always use the first pollfd 366 notifier = new QSocketNotifier(ufds[0].fd, QSocketNotifier::Read, this); 367 notifier->setEnabled(true); 374 //Always use the first pollfd 375 QSocketNotifier::Type type; 376 switch (ufds[0].events & (POLLIN | POLLPRI | POLLOUT)) 378 case POLLIN: 379 kDebug() << "QSocketNotifier::Read"; 380 type = QSocketNotifier::Read;adb.h https://gitlab.com/adam.lukaitis/Team-Win-Recovery-Project | C Header | 427 lines
197 198asocket *find_local_socket(unsigned id); 199void install_local_socket(asocket *s); 205asocket *create_local_socket(int fd); 206asocket *create_local_service_socket(const char *destination); 207 207 208asocket *create_remote_socket(unsigned id, atransport *t); 209void connect_to_remote(asocket *s, const char *destination); 209void connect_to_remote(asocket *s, const char *destination); 210void connect_to_smartsocket(asocket *s); 211 267#if ADB_HOST 268asocket *host_service_to_socket(const char* name, const char *serial); 269#endifstarttls.c git://pkgs.fedoraproject.org/cone | C | 803 lines
49#endif 50#include <sys/socket.h> 51#include <arpa/inet.h> 439 440 if ((fd=rfc1035_mksocket(SOCK_STREAM, 0, &af)) < 0) 441 { 441 { 442 nonsslerror("socket"); 443 return (-1);enable_connection_aborted.html git://github.com/barrbrain/asio.git | HTML | 82 lines
7<link rel="start" href="../../../index.html" title="Asio"> 8<link rel="up" href="../basic_socket.html" title="basic_socket"> 9<link rel="prev" href="do_not_route.html" title="basic_socket::do_not_route"> 15<div class="spirit-nav"> 16<a accesskey="p" href="do_not_route.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../basic_socket.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="endpoint_type.html"><img src="../../../next.png" alt="Next"></a> 17</div> 19<div class="titlepage"><div><div><h4 class="title"> 20<a name="asio.reference.basic_socket.enable_connection_aborted"></a><a class="link" href="enable_connection_aborted.html" title="basic_socket::enable_connection_aborted">basic_socket::enable_connection_aborted</a> 21</h4></div></div></div> 32<p> 33 Implements a custom socket option that determines whether or not an accept 34 operation is permitted to fail with <code class="computeroutput"><span class="identifier">asio</span><span class="special">::</span><span class="identifier">error</span><span class="special">::</span><span class="identifier">connection_aborted</span></code>. 36 </p> 37<a name="asio.reference.basic_socket.enable_connection_aborted.examples"></a><h6> 38<a name="id913415"></a>lossydatareceiver.cc git://github.com/somaproject/libsomanetwork.git | C++ | 279 lines
26 27 socket_ = socket(AF_INET, SOCK_DGRAM, 17); 28 if (socket_ < 0) { 41 42 // confiugre socket for reuse 43 optval = 1; 43 optval = 1; 44 int res = setsockopt(socket_, SOL_SOCKET, SO_REUSEADDR, 45 &optval, sizeof (optval)); 50 optval = 1; 51 res = setsockopt(socket_, SOL_SOCKET, SO_BROADCAST, 52 &optval, sizeof (optval)); 57 optval = 500000; 58 res = setsockopt (socket_, SOL_SOCKET, SO_RCVBUF, 59 (const void *) &optval, sizeof(optval));mod_scgi.cpp git://github.com/stefanocasazza/ULib.git | C++ | 235 lines
15#include <ulib/utility/uhttp.h> 16#include <ulib/net/tcpsocket.h> 17#include <ulib/utility/services.h> 51 // 52 // NAME_SOCKET file name for the scgi socket 53 // 88 89 U_NEW(UTCPSocket, connection->socket, UTCPSocket(connection->bIPv6)); 90# else 90# else 91 if (connection->port) U_NEW(UTCPSocket, connection->socket, UTCPSocket(connection->bIPv6)) 92 else U_NEW(UUnixSocket, connection->socket, UUnixSocket) 188 * more data is going to be send. More importantly, it doesn't close the 189 * socket. At the socket layer, this sends a TCP/IP FIN packet to the receiver 190 */epgacqsrv.h git://pkgs.fedoraproject.org/nxtvepg | C Header | 197 lines
191sint EpgAcqServer_GetFdSet( fd_set * rd, fd_set * wr ); 192void EpgAcqServer_HandleSockets( fd_set * rd, fd_set * wr ); 193void EpgAcqServer_AddBlock( EPGDB_CONTEXT * dbc, EPGDB_BLOCK * pNewBlock );device_util.mm https://github.com/chromium/chromium.git | Objective C++ | 183 lines
12#include <string.h> 13#include <sys/socket.h> 14#include <sys/sysctl.h>buy_support.php https://gitlab.com/alexprowars/bitrix | PHP | 188 lines
41 <? 42 $ht = new Bitrix\Main\Web\HttpClient(array("socketTimeout" => 30)); 43 $arF = array( 88 <? 89 $ht = new Bitrix\Main\Web\HttpClient(array("socketTimeout" => 30)); 90 $arF = array(sock.c https://gitlab.com/Sean.W/pru-linux-drivers | C | 304 lines
32#include <linux/skbuff.h> 33#include <linux/socket.h> 34#include <linux/ioctl.h> 56 57static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) 58{ 63 struct hidp_conninfo ci; 64 struct socket *csock; 65 struct socket *isock; 143 int ctrl_sock; // Connected control socket 144 int intr_sock; // Connteted interrupt socket 145 __u16 parser; 232 .connect = sock_no_connect, 233 .socketpair = sock_no_socketpair, 234 .accept = sock_no_accept,HTUtils.h git://github.com/alandipert/ncsa-mosaic.git | C Header | 268 lines
210#define HT_REDIRECTING 29998 211#define HT_LOADED 29999 /* Instead of a socket */ 212#define HT_INTERRUPTED -29998HTTPURLLoader.as http://crossxhr.googlecode.com/svn/trunk/ | ActionScript | 197 lines
28 29 private var socket:Socket; 30 private var headerComplete:Boolean = false; 48 49 socket = new Socket(); 50 52 socket.addEventListener( "close" , onCloseEvent , false, 0 ); 53 socket.addEventListener( "ioError" , onIOErrorEvent , false, 0 ); 54 socket.addEventListener( "securityError" , onSecurityErrorEvent , false, 0 ); 54 socket.addEventListener( "securityError" , onSecurityErrorEvent , false, 0 ); 55 socket.addEventListener( "socketData" , onSocketDataEvent , false , 0 ); 56 } 109 var str:String = ""; 110 try { str = socket.readUTFBytes(socket.bytesAvailable); } catch(e:Error) { } 111 if(!headerComplete) {History_rdoc.html https://github.com/toy/rb.git | HTML | 532 lines
80<ul> 81<li>Reworked socket timeout code due to several customer complaints about 82timeouts not working 100% of the time since 1.7.3. 136<ul> 137<li>Rollback socket timeout optimization. It does not work on all operating 138systems and was a support headache. 146<ul> 147<li>Rely on higher performance operating system socket timeouts for low-level 148socket read/writes where possible, instead of the (slower) SystemTimer or 280<ul> 281<li>Add option to disable socket timeout support. Socket timeout has a 282significant performance penalty (approx 3x slower than without in Ruby 314</li> 315<li>Implement socket timeouts, should fix rare cases of very bad things 316happening in production at 37signals and FiveRuns. (jseirles)CreateVDSCommand.java git://pkgs.fedoraproject.org/ovirt-engine | Java | 319 lines
100 if (Config.<Boolean> GetValue(ConfigValues.SendSMPOnRunVm)) { 101 mCreateInfo.add(VdsProperties.cores_per_socket, (new Integer(mVm.getcpu_per_socket())).toString()); 102 }config.h.in http://opensource.apple.com/release/ios-511/ | Autoconf | 464 lines
149 150/* Define to 1 if you have the `socket' library (-lsocket). */ 151#undef HAVE_LIBSOCKET 225/* */ 226#undef HAVE_SOCKETPAIR 227 295 296/* Define to 1 if you have the <sys/socket.h> header file. */ 297#undef HAVE_SYS_SOCKET_H 393 394/* Define if sockets need to be shutdown */ 395#undef SHUTDOWN_ALL_SOCKETSsyscall_table.S https://gitlab.com/Krzyzanowski_Pawel/biosignal_gen | Assembly | 327 lines
103 .long sys_ni_syscall /* ioperm syscall holder */ 104 .long sys_socketcall 105 .long sys_syslogeX_setup.h git://git.savannah.nongnu.org/exosip.git | C Header | 377 lines
121#define EXOSIP_OPT_DNS_CAPABILITIES (EXOSIP_OPT_BASE_OPTION+14) /**< int *: 0 to disable, 2 to use NAPTR/SRV record */ 122#define EXOSIP_OPT_SET_DSCP (EXOSIP_OPT_BASE_OPTION+15) /**< int *: set a dscp value for SIP socket */ 123#define EXOSIP_OPT_REGISTER_WITH_DATE (EXOSIP_OPT_BASE_OPTION+16) /**< int *: enable usage of Date header in REGISTER */ 238/** 239 * Listen on a specified socket. 240 * 250/** 251 * Reset transport sockets. 252 * 262 * @param transport IPPROTO_UDP for udp. (soon to come: TCP/TLS?) 263 * @param socket socket to use for listening to UDP sip messages. 264 * @param port the listening port for masquerading. 265 */ 266 int eXosip_set_socket (struct eXosip_t *excontext, int transport, int socket, int port); 267IrServerApplet.lua http://irserversb.googlecode.com/svn/trunk/ | Lua | 523 lines
67 68local socket = require("socket") 69local os = require("os") 291 -- load namespace 292 -- create a TCP socket and bind it to the local host, at any port 293 server = socket.bind("*", 8174)openssl_stream_service.hpp http://openqwaq.googlecode.com/svn/trunk/ | C++ Header | 532 lines
164 165 // Construct a new stream socket service for the specified io_service. 166 explicit openssl_stream_service(asio::io_service& io_service)overview-summary.html http://j-sim.googlecode.com/svn/trunk/ | HTML | 318 lines
191<TR BGCOLOR="white" CLASS="TableRowColor"> 192<TD WIDTH="20%"><B><A HREF="drcl/inet/socket/package-summary.html">drcl.inet.socket</A></B></TD> 193<TD> </TD>Program.cs https://code.google.com/p/prjtest00/ | C# | 352 lines
56 //console. 57 Socket NewSocket = listener.EndAcceptSocket(Result); 58 74 { 75 Socket ClientSocket = (Socket)Result.AsyncState; 76 try 84 Console.WriteLine("[{0}][Receive Message]: {1}", (int)ClientSocket.Handle, Encoding.ASCII.GetString(_RecvBuff, 0, RecvSize)); 85 ClientSocket.BeginReceive(_RecvBuff, 0, _RecvBuff.Length, SocketFlags.None, new AsyncCallback(DoReceiveCallback), ClientSocket); 86 } 192 // { 193 // Socket NewSocket = Listener.AcceptSocket(); 194 // if (NewSocket.Connected) 256 //AcceptThread.Start(Listener); 257// Socket mySocket = myTcpListener.AcceptSocket(); 258 //dologin.c https://gitlab.com/tlevine/DragonFlyBSD | C | 437 lines
32#include <sys/types.h> 33#include <sys/socket.h> 34#include <sys/sysctl.h>SocketReactor.h http://mingw-lib.googlecode.com/svn/trunk/ | C++ Header | 239 lines
88 /// Once started, the SocketReactor waits for events 89 /// on the registered sockets, using Socket::select(). 90 /// If an event is detected, the corresponding event handler 106 /// 107 /// If there are no sockets for the SocketReactor to pass to 108 /// Socket::select(), an IdleNotification will be dispatched to 164 165 void addEventHandler(const Socket& socket, const Poco::AbstractObserver& observer); 166 /// Registers an event handler with the SocketReactor. 171 172 void removeEventHandler(const Socket& socket, const Poco::AbstractObserver& observer); 173 /// Unregisters an event handler with the SocketReactor. 200 201 void dispatch(const Socket& socket, SocketNotification* pNotification); 202 /// Dispatches the given notification to all observersrunserver.py https://gitlab.com/Guy1394/django | Python | 189 lines
5import re 6import socket 7import sys 68 self.use_ipv6 = options.get('use_ipv6') 69 if self.use_ipv6 and not socket.has_ipv6: 70 raise CommandError('Your Python does not support IPv6.') 137 ipv6=self.use_ipv6, threading=threading) 138 except socket.error as e: 139 # Use helpful error messages instead of ugly tracebacks.main.cpp https://gitlab.com/Guy1394/MoSync | C++ | 368 lines
16/** 17* This example shows how to do DNS over UDP while using unbound sockets. 18*/mdns-ffi.lisp http://cl-dns-sd.googlecode.com/svn/trunk/ | Lisp | 194 lines
75 76;; A wrapper around DNSServiceRefSockFD that raises a SOCKET-FD-ERROR 77;; if the returned value is -1. It seems that if the mDNS daemon 83 (if (eql sock -1) 84 (error 'socket-fd-error :oid ref) 85 sock)))TcpSocket.h https://bitbucket.org/CatrinaEmu/core/ | C++ Header | 357 lines
29*/ 30#ifndef _SOCKETS_TcpSocket_H 31#define _SOCKETS_TcpSocket_H 51 \ingroup basic */ 52class TcpSocket : public StreamSocket 53{ 266protected: 267 TcpSocket(const TcpSocket& ); 268 void OnRead(); 300private: 301 TcpSocket& operator=(const TcpSocket& ) { return *this; } 302 353 354#endif // _SOCKETS_TcpSocket_H 355app.js https://gitlab.com/Mashamba/NodeBB | JavaScript | 516 lines
1"use strict"; 2/*global io, templates, ajaxify, utils, bootbox, overrides, socket, config, Visibility*/ 3 56 57 socket.removeAllListeners('event:nodebb.ready'); 58 socket.on('event:nodebb.ready', function(data) { 132 callback = callback || function() {}; 133 if (socket) { 134 if (app.currentRoom === room) { 137 138 socket.emit('meta.rooms.enter', { 139 enter: room, 155 app.leaveCurrentRoom = function() { 156 if (!socket) { 157 return;doc.go https://gitlab.com/willjharmer/kanban | Go | 151 lines
1// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style 4 5// Package websocket implements the WebSocket protocol defined in RFC 6455. 6// 8// 9// The Conn type represents a WebSocket connection. A server application uses 10// the Upgrade function from an Upgrader object with a HTTP request handler 12// 13// var upgrader = websocket.Upgrader{ 14// ReadBufferSize: 1024, 41// In above snippet of code, p is a []byte and messageType is an int with value 42// websocket.BinaryMessage or websocket.TextMessage. 43// 70// 71// The WebSocket protocol distinguishes between text and binary data messages. 72// Text messages are interpreted as UTF-8 encoded text. The interpretation ofAddress.java http://dataturbine.googlecode.com/svn/trunk/ | Java | 559 lines
39 * <p> 40 * The <code>TCP</code> class provides the low-level TCP socket handling 41 * methods for using TCP server sockets as the address of an RBNB DataTurbine 49 * handling of the memory-to-memory copies. It is the RAM equivalent of a 50 * standard TCP socket. 51 * <p> 53 * side handling of the memory-to-memory copies. It is the RAM equivalent of a 54 * TCP server socket. 55 * <p> 384 } else if (type.equalsIgnoreCase("TCP:")) { 385 // TCP addresses use the TCP class for TCP socket to server 386 // socket communications.w.c https://bitbucket.org/freebsd/freebsd-head | C | 529 lines
56#include <sys/ioctl.h> 57#include <sys/socket.h> 58#include <sys/tty.h>TestPackage.java git://github.com/JetBrains/intellij-community.git | Java | 287 lines
64 final TestClassFilter classFilter = computeFilter(data); 65 return new SearchForTestsTask(getConfiguration().getProject(), myServerSocket) { 66 private final Set<Location<?>> myClasses = new LinkedHashSet<>(); 204 205 createServerSocket(javaParameters); 206 return javaParameters;silcexample-SilcExampleType.html git://pkgs.fedoraproject.org/libsilc | HTML | 223 lines
115 <a href=silcstream.html><img src=box2.gif border=0 alt=>Abstract Stream Interface</a><br /> 116 <a href=silcsocketstream.html><img src=box2.gif border=0 alt=>Socket Stream Interface</a><br /> 117 <a href=silcfdstream.html><img src=box2.gif border=0 alt=>File Descriptor Stream Interface</a><br />History.md https://gitlab.com/samundrak/chat-app | Markdown | 473 lines
223 224 * websocket: pass `undefined` as the WebSocket "protocols" 225 279 * socket: Don't lose packets writen during upgrade after a re-open 280 * socket: use a consistent "debug" name for socket.js 281 * package: Update emitter dep to 1.0.1 for old IE support 293 * socket: ignore further transport communication upon `onClose` 294 * socket: added missing `socket#onerror` support 295 * socket: don't call `socket#onclose` if previous state was not `open` 306 307 * does not emit close on incorrect socket connection 308 * use indexof component for ie8 and below 372 373 * socket: fix closing the socket in an `open` listener [mmastrac] 374 * socket: perform ping interval/timer cleanup [mmastrac]convert_gio.m4 git://pkgs.fedoraproject.org/glibmm24 | m4 | 271 lines
229_CONVERSION(`GSocketAddress*',`Glib::RefPtr<SocketAddress>',`Glib::wrap($3)') 230_CONVERSION(`const Glib::RefPtr<SocketAddress>&',`GSocketAddress*',__CONVERT_CONST_REFPTR_TO_P) 231_CONVERSION(`Glib::RefPtr<SocketAddress>&',`GSocketAddress*',__CONVERT_CONST_REFPTR_TO_P) 231_CONVERSION(`Glib::RefPtr<SocketAddress>&',`GSocketAddress*',__CONVERT_CONST_REFPTR_TO_P) 232_CONVERSION(`GSocketAddressEnumerator*',`Glib::RefPtr<SocketAddressEnumerator>',`Glib::wrap($3)') 233 234#SocketConnectable 235_CONVERSION(`const Glib::RefPtr<SocketConnectable>&',`GSocketConnectable*',__CONVERT_CONST_REFPTR_TO_P) 236 238_CONVERSION(`GSocketConnection*',`Glib::RefPtr<SocketConnection>',`Glib::wrap($3)') 239_CONVERSION(`const Glib::RefPtr<SocketConnection>&',`GSocketConnection*',__CONVERT_CONST_REFPTR_TO_P) 240 241#SocketControlMessage 242_CONVERSION(`GSocketControlMessage*',`Glib::RefPtr<SocketControlMessage>',`Glib::wrap($3)') 243CreateRouteResponseResult.java https://github.com/aws/aws-sdk-java.git | Java | 389 lines
22 * <p> 23 * Represents the model selection expression of a route response. Supported only for WebSocket APIs. 24 * </p> 53 * <p> 54 * Represents the model selection expression of a route response. Supported only for WebSocket APIs. 55 * </p> 57 * @param modelSelectionExpression 58 * Represents the model selection expression of a route response. Supported only for WebSocket APIs. 59 */ 66 * <p> 67 * Represents the model selection expression of a route response. Supported only for WebSocket APIs. 68 * </p> 69 * 70 * @return Represents the model selection expression of a route response. Supported only for WebSocket APIs. 71 */openssl_operation.hpp http://openqwaq.googlecode.com/svn/trunk/ | C++ Header | 517 lines
28#include "asio/write.hpp" 29#include "asio/detail/socket_ops.hpp" 30#include "asio/ssl/detail/openssl_types.hpp" 86 openssl_operation(ssl_primitive_func primitive, 87 Stream& socket, 88 net_buffer& recv_buf, 97 , recv_buf_(recv_buf) 98 , socket_(socket) 99 , ssl_bio_(ssl_bio) 117 openssl_operation(ssl_primitive_func primitive, 118 Stream& socket, 119 net_buffer& recv_buf, 124 , recv_buf_(recv_buf) 125 , socket_(socket) 126 , ssl_bio_(ssl_bio)persistent.py git://github.com/mrjoes/tornadio2.git | Python | 193 lines
29from tornado import stack_context 30from tornado.websocket import WebSocketHandler 31 37 38class TornadioWebSocketHandler(WebSocketHandler): 39 """Websocket protocol handler""" 65 66 # Upgrade header should be present and should be equal to WebSocket 67 if self.request.headers.get("Upgrade", "").lower() != 'websocket': 69 "HTTP/1.1 400 Bad Request\r\n\r\n" 70 "Can \"Upgrade\" only to \"WebSocket\"." 71 )) 190 191class TornadioFlashSocketHandler(TornadioWebSocketHandler): 192 # Transport nameTestPing.java git://pkgs.fedoraproject.org/mod_cluster | Java | 184 lines
30import java.io.IOException; 31import java.net.ServerSocket; 32 138 try { 139 ServerSocket sock = new ServerSocket(8012); 140 } catch (Exception ex) { 140 } catch (Exception ex) { 141 fail("can't create ServerSocket on 8012"); 142 }route-linux.c git://pkgs.fedoraproject.org/nmap | C | 284 lines
12#include <sys/ioctl.h> 13#include <sys/socket.h> 14#include <sys/uio.h> 53 54 if ((r->fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) 55 return (route_close(r)); 56 57 if ((r->nlfd = socket(AF_NETLINK, SOCK_RAW, 58 NETLINK_ROUTE)) < 0)linc-private.h git://pkgs.fedoraproject.org/ORBit2 | C Header | 221 lines
107 LinkWatch *link_watch; 108 SOCKET socket; 109 int event_mask; 151 */ 152#define LINK_TEMP_FAILURE_RETRY_SOCKET(expression, val) \ 153 { int __result; \ 154 do __result = (int) (expression); \ 155 while (__result == SOCKET_ERROR && WSAGetLastError() == WSAEINTR); \ 156 val = __result; } 157 158#define LINK_CLOSE_SOCKET(fd) while (closesocket (fd) == SOCKET_ERROR && WSAGetLastError() == WSAEINTR) 159 161 162/* On Unix socket API calls are no different from normal system calls */ 163coulomb.c git://pkgs.fedoraproject.org/apbs | C | 176 lines
77 if (sock == VNULL) { 78 Vnm_print(2, "Problem opening virtual socket %s!\n", 79 path); 82 if (Vio_accept(sock, 0) < 0) { 83 Vnm_print(2, "Problem accepting virtual socket %s!\n", 84 path);unix-fd.c git://pkgs.fedoraproject.org/glib2 | C | 241 lines
47 GUnixFDList *list, *l2; 48 GSocket *sockets[2]; 49 GSocketAddress *addr; 152 g_assert_no_error (err); 153 g_assert (G_IS_SOCKET (sockets[1])); 154 157 g_assert (G_IS_UNIX_SOCKET_ADDRESS (addr)); 158 g_assert_cmpint (g_unix_socket_address_get_address_type (G_UNIX_SOCKET_ADDRESS (addr)), ==, G_UNIX_SOCKET_ADDRESS_ANONYMOUS); 159 g_assert_cmpint (g_unix_socket_address_get_path_len (G_UNIX_SOCKET_ADDRESS (addr)), ==, 0); 178 ov.size = 1; 179 s = g_socket_send_message (sockets[0], NULL, &ov, 1, 180 (GSocketControlMessage **) &message, 190 iv.size = 1; 191 s = g_socket_receive_message (sockets[1], NULL, &iv, 1, 192 (GSocketControlMessage ***) &mv,MemoryFileSystem.js git://github.com/DarthFubuMVC/fubumvc.git | JavaScript | 226 lines
57 isFIFO: falseFn, 58 isSocket: falseFn 59 }; 67 isFIFO: falseFn, 68 isSocket: falseFn 69 };Relation.scala git://github.com/ornicar/lila.git | Scala | 193 lines
162 ) 163 .add("online" -> env.socket.isOnline(r.user.id)) 164 }))MongoUrlTests.cs git://github.com/mongodb/mongo-csharp-driver.git | C# | 142 lines
58 ServerSelectionTimeout = TimeSpan.FromSeconds(10), 59 SocketTimeout = TimeSpan.FromSeconds(7), 60 Username = "username", 89 "serverSelectionTimeout=10s", 90 "socketTimeout=7s", 91 "waitQueueSize=123", 118 Assert.AreEqual(TimeSpan.FromSeconds(10), url.ServerSelectionTimeout); 119 Assert.AreEqual(TimeSpan.FromSeconds(7), url.SocketTimeout); 120 Assert.AreEqual("username", url.Username);server.c https://gitlab.com/tlevine/DragonFlyBSD | C | 415 lines
31 32#include <sys/socket.h> 33#include <netinet/in.h> 262 263 s = socket(PF_LOCAL, SOCK_STREAM, 0); 264 if (s < 0) { 264 if (s < 0) { 265 log_Printf(LogERROR, "Local: socket: %s\n", strerror(errno)); 266 goto failed; 267 } 268 setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &s, sizeof s); 269 if (mask != (mode_t)-1) 280 if (listen(s, 5) != 0) { 281 log_Printf(LogERROR, "Local: Unable to listen to socket -" 282 " BUNDLE overload?\n");genetlink.h https://gitlab.com/cybok/BMW-OpenSource | C Header | 310 lines
133 * genlmsg_put - Add generic netlink header to netlink message 134 * @skb: socket buffer holding the message 135 * @pid: netlink pid the message is addressed to 163 * genlmsg_put_reply - Add generic netlink header to a reply message 164 * @skb: socket buffer holding the message 165 * @info: receiver info 182 * genlmsg_end - Finalize a generic netlink message 183 * @skb: socket buffer the message is stored in 184 * @hdr: user specific header 192 * genlmsg_cancel - Cancel construction of a generic netlink message 193 * @skb: socket buffer the message is stored in 194 * @hdr: generic netlink message header 204 * @net: the net namespace 205 * @skb: netlink message as socket buffer 206 * @pid: own netlink pid to avoid sending to yourselfMSKeyManagerImpl.java http://umjammer.googlecode.com/svn/trunk/ | Java | 373 lines
13import java.math.BigInteger; 14import java.net.Socket; 15import java.security.GeneralSecurityException; 58 /** 59 * Choose an alias to authenticate the client side of a secure socket given 60 * the public key type and the list of certificate issuer authorities 62 */ 63 public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket) { 64 String alias = null; 89 /** 90 * Choose an alias to authenticate the server side of a secure socket given 91 * the public key type and the list of certificate issuer authorities 93 */ 94 public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) { 95 String alias = null;